mozilla / qbrt

CLI to a Gecko desktop app runtime
Apache License 2.0
390 stars 31 forks source link

cannot install qbrt #178

Closed AggamR closed 3 years ago

AggamR commented 3 years ago

Hello! I am using manjaroand NodeJS (from snap) 12. When I I get this error:

[~]$ sudo npm install -g qbrt                                          14:46:50
/usr/local/bin/qbrt -> /usr/local/lib/node_modules/qbrt/bin/cli.js
npm WARN lifecycle The node binary used for scripts is /var/lib/snapd/snap/bin/node but npm is using /var/lib/snapd/snap/node/3292/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.

> qbrt@0.2.5 postinstall /usr/local/lib/node_modules/qbrt
> node ./bin/postinstall.js

2020/11/27 14:47:03.810172 cmd_run.go:994: WARNING: cannot create user data directory: cannot create "/snap/node/common": mkdir /snap/node/common: permission denied
cannot create user data directory: /snap/node/3292: Not a directory
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! qbrt@0.2.5 postinstall: `node ./bin/postinstall.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the qbrt@0.2.5 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-11-27T12_47_04_414Z-debug.log

Why?

Edit: After trying node 15 from the official repos I got:

[~]$ sudo npm install -g qbrt                                          14:50:45
/usr/bin/qbrt -> /usr/lib/node_modules/qbrt/bin/cli.js

> qbrt@0.2.5 postinstall /usr/lib/node_modules/qbrt
> node ./bin/postinstall.js

✗ Installing runtime … failed!
AssertionError [ERR_ASSERTION]: rimraf: missing path
    at rimraf (/usr/lib/node_modules/qbrt/node_modules/fs-extra/lib/remove/rimraf.js:35:3)
    at rimraf (/usr/lib/node_modules/qbrt/node_modules/universalify/index.js:5:67)
    at /usr/lib/node_modules/qbrt/node_modules/pify/index.js:29:7
    at new Promise (<anonymous>)
    at /usr/lib/node_modules/qbrt/node_modules/pify/index.js:12:10
    at ret (/usr/lib/node_modules/qbrt/node_modules/pify/index.js:56:34)
    at /usr/lib/node_modules/qbrt/bin/install-runtime.js:262:27
    at <anonymous> {
  generatedMessage: false,
  code: 'ERR_ASSERTION',
  actual: undefined,
  expected: true,
  operator: '=='
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! qbrt@0.2.5 postinstall: `node ./bin/postinstall.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the qbrt@0.2.5 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-11-27T12_51_13_371Z-debug.log
AggamR commented 3 years ago

solved