I don't have google-chrome
, but I have chromium
.
const open = require('open');
open('https://google.com', {
app: {name: open.apps.chrome},
// wait: true,
});
$ npm i [email protected]
$ node index.js
node:events:490
throw er; // Unhandled 'error' event
^
Error: spawn google-chrome ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:285:19)
at onErrorNT (node:internal/child_process:483:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ChildProcess instance at:
at ChildProcess._handle.onexit (node:internal/child_process:291:12)
at onErrorNT (node:internal/child_process:483:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn google-chrome',
path: 'google-chrome',
spawnargs: [ 'https://google.com' ]
}
Node.js v19.6.1
The relevant part of the code.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too