winnekes / itypescript

ITypescript is a typescript kernel for the Jupyter notebook (A modified version of IJavascript)
Other
190 stars 29 forks source link

prebuild-install WARN install EACCES on Amazonlinux #12

Open opsrom opened 5 years ago

opsrom commented 5 years ago

Hello, I've got a small problem when I try to install the kernel :

node scripts/prebuild-install.js || (node scripts/preinstall.js && node-gyp rebuild)

prebuild-install WARN install EACCES: permission denied, access '/root/.npm'

fs.js:114 throw err; ^

Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/itypescript/node_modules/zeromq/zmq' at Object.mkdirSync (fs.js:752:3) at Object. (/usr/lib/node_modules/itypescript/node_modules/zeromq/scripts/preinstall.js:89:8) at Module._compile (internal/modules/cjs/loader.js:701:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10) at Module.load (internal/modules/cjs/loader.js:600:32) at tryModuleLoad (internal/modules/cjs/loader.js:539:12) at Function.Module._load (internal/modules/cjs/loader.js:531:3) at Function.Module.runMain (internal/modules/cjs/loader.js:754:12) at startup (internal/bootstrap/node.js:283:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3) npm ERR! code ELIFECYCLE

I'm root.. no access problem I think.. but I always have this error... any clue ? Thanks

n-riesco commented 5 years ago

In general, I wouldn't recommend to install npm packages as root. If you need you, npm v5 and above require the use of the flag --unsafe-perm. See here how.

QGB commented 4 years ago

In general, I wouldn't recommend to install npm packages as root. If you need you, npm v5 and above require the use of the flag --unsafe-perm. See here how.

npm install -g ijavascript --unsafe-perm

fatihsaral commented 3 years ago

npm install kerberos -g

root@docker-ubuntu-s-1vcpu-1gb-amd-nyc1-01:/# npm install run-rs -g /usr/local/bin/run-rs -> /usr/local/lib/node_modules/run-rs/index.js

kerberos@1.1.5 install /usr/local/lib/node_modules/run-rs/node_modules/kerberos prebuild-install || node-gyp rebuild

prebuild-install WARN install EACCES: permission denied, access '/root/.npm' gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/run-rs/node_modules/kerberos/build' gyp ERR! System Linux 5.4.0-52-generic gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "rebuild" gyp ERR! cwd /usr/local/lib/node_modules/run-rs/node_modules/kerberos gyp ERR! node -v v10.19.0 gyp ERR! node-gyp -v v6.1.0 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! kerberos@1.1.5 install: prebuild-install || node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the kerberos@1.1.5 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-05-13T17_19_39_791Z-debug.log

When loading the kerberos library as above, I get an authorization error for the '/root/.npm' folder.

npm install kerberos -g --unsafe-perm it is work! Thank you @n-riesco