A Deno library to find Chrome browser installations across different operating systems (Windows, macOS, and Linux).
The code for this has been adapted from npm chrome-finder
- 🔍 Automatically detects Chrome installations
- 🌐 Cross-platform support (Windows, macOS, Linux)
- ⚡ Lightweight and fast
- 🔒 Type-safe with TypeScript
# Using Deno
import { findChrome } from "jsr:@attalliayoub/chrome-finder@0.1.0";import { findChrome } from "@attalliayoub/chrome-finder";
try {
const chromePath = findChrome();
console.log("Chrome found at:", chromePath);
} catch (error) {
if (error.message === "no chrome installations found") {
console.log("No Chrome installation found on your system");
} else if (error.message === "platform not support") {
console.log("Your operating system is not supported");
}
}Returns the path to the first found Chrome installation.
string: The full path to the Chrome executable
Error: "no chrome installations found" - When no Chrome installation is detectedError: "platform not support" - When running on an unsupported operating system
- Windows
- Chrome Stable
- Chrome Beta
- Chrome SxS (Canary)
- Chromium
- macOS
- Chrome Stable
- Chrome Beta
- Chrome SxS (Canary)
- Chromium
- Linux
- Chrome Stable
- Chrome Beta
- Chrome SxS (Canary)
- Chromium
# Run tests in watch mode
deno task dev- @attalliayoub/fs-access - File system access utilities
- @std/path - Path manipulation utilities
- @std/assert - Assertion utilities