10gen / realm-cli

MongoDB Realm CLI
Apache License 2.0
6 stars 23 forks source link

Unable to install realm-cli on ubuntu 20.04 / npm 6.14.4 #217

Open ghost opened 3 years ago

ghost commented 3 years ago

After installing npm on ubuntu 20.04

~# npm --version 6.14.4

Here is the log :

`~# npm install -g mongodb-realm-cli npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. /usr/local/bin/realm-cli -> /usr/local/lib/node_modules/mongodb-realm-cli/wrapper.js

mongodb-realm-cli@2.2.0 install /usr/local/lib/node_modules/mongodb-realm-cli node install.js

downloading "realm-cli" from "https://s3.amazonaws.com/realm-clis/realm_cli_rhel70_eac24f7b9b5bf9038f57b4cc658750ccc302d86a_21_09_29_13_29_04/linux-amd64/realm-cli" failed to download Realm CLI: { Error: EACCES: permission denied, open '/usr/local/lib/node_modules/mongodb-realm-cli/realm-cli' at Object.openSync (fs.js:443:3) at Promise (/usr/local/lib/node_modules/mongodb-realm-cli/install.js:62:24) at new Promise () at requstBinary (/usr/local/lib/node_modules/mongodb-realm-cli/install.js:56:10) at Object. (/usr/local/lib/node_modules/mongodb-realm-cli/install.js:101:1) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) errno: -13, syscall: 'open', code: 'EACCES', path: '/usr/local/lib/node_modules/mongodb-realm-cli/realm-cli' } npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! mongodb-realm-cli@2.2.0 install: node install.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the mongodb-realm-cli@2.2.0 install 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/2021-10-13T12_20_58_544Z-debug.log `

Any idea to install this client ? Thanks.

ghost commented 3 years ago

FYI, upgrading npm to v8.x fixed the problem.