You are not logged in.
Hello my friends,
my npm is broken. If I try to install angular by npm I run into an endless loop.
sudo npm install -g @angular/cli
...
gyp verb tmpdir == cwd automatically will remove dev files after to save disk space
gyp verb command install [ '8.4.0' ]
gyp verb install input version string "8.4.0"
gyp verb install installing version: 8.4.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version not already installed, continuing with install 8.4.0
gyp verb ensuring nodedir is created /usr/lib/node_modules/@angular/cli/node_modules/node-sass/.node-gyp/8.4.0
gyp WARN EACCES user "root" does not have permission to access the dev dir "/usr/lib/node_modules/@angular/cli/node_modules/node-sass/.node-gyp/8.4.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/@angular/cli/node_modules/node-sass/.node-gyp"
gyp verb tmpdir == cwd automatically will remove dev files after to save disk space
gyp verb command install [ '8.4.0' ]
gyp verb install input version string "8.4.0"
gyp verb install installing version: 8.4.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version not already installed, continuing with install 8.4.0
gyp verb ensuring nodedir is created /usr/lib/node_modules/@angular/cli/node_modules/node-sass/.node-gyp/8.4.0
gyp WARN EACCES user "root" does not have permission to access the dev dir "/usr/lib/node_modules/@angular/cli/node_modules/node-sass/.node-gyp/8.4.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/@angular/cli/node_modules/node-sass/.node-gyp"
...
User "root" have no permissions ...!? Holy mother of god!
I try to clean cache, reinstall npm, uninstall and install @angular/cli and clean node_module directory without success.
npm -v
5.3.0
node -v
v8.4.0
If I try to install angular-ide I get the error output:
sudo npm install -g angular-ide
[sudo] Passwort für laxlexis:
/usr/bin/ngide -> /usr/lib/node_modules/angular-ide/bin/ngide
> angular-ide@0.9.31 postinstall /usr/lib/node_modules/angular-ide
> node ./scripts/post.js
fs.js:1133
return binding.chmod(pathModule._makeLong(path), modeNum(mode));
^
Error: EPERM: operation not permitted, chmod '/usr/lib/node_modules/angular-ide/bin/ng'
at Object.fs.chmodSync (fs.js:1133:18)
at Object.<anonymous> (/usr/lib/node_modules/angular-ide/scripts/post.js:6:4)
at Module._compile (module.js:573:30)
at Object.Module._extensions..js (module.js:584:10)
at Module.load (module.js:507:32)
at tryModuleLoad (module.js:470:12)
at Function.Module._load (module.js:462:3)
at Function.Module.runMain (module.js:609:10)
at startup (bootstrap_node.js:158:16)
at bootstrap_node.js:598:3
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules/angular-ide/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! angular-ide@0.9.31 postinstall: `node ./scripts/post.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular-ide@0.9.31 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/2017-08-17T06_38_07_140Z-debug.log
sudo npm install -g angular-ide 21,88s user 2,80s system 51% cpu 47,510 total
Last edited by Lax Lexis (2017-08-17 11:21:50)
Offline
Sometimes it helps to read the documentation. <.<
Offline
sudo npm install -g @angular/cli --unsafe-perm
did also do the trick for me ;-)
Offline