sindresorhus/opn
Do you want to work on this issue?
You can request for a bounty in order to promote it!
It doesn't fall back to other binaries when `wait: false` #301
x-yuri posted onGitHub
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 open@8.4.2
$ 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.