Npm global dependencies



Saw your post about Circle CI 2.0, so i decided to start doing some research moving one of my latest Open Source projects over before i recommend we do it at work.

When i try to install @angular/cli as a global npm dependency (npm install -g @angular/cli) it gives me an access denied error.

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR!  { Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib/node_modules' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/circleci/.npm/_logs/2017-07-12T02_47_37_570Z-debug.log
Exited with code 243

Adding sudo ahead of it causes it to take over 30 minutes trying to install it in a temporary directory.
I’m waiting for a build to finish so i can grab that log, but if CircleCI 2.0 really takes that much longer i’ll be remaining on Circle CI 1.0 :wink:

EDIT: also here is my config.yml file

EDIT 2: Cool, so its still building but i grabbed the piece that is making my life difficult. It seems every dependency of @angular/cli, and every dependency of that dependency etc, is returning this error.

gyp verb ensuring nodedir is created /usr/local/lib/node_modules/@angular/cli/node_modules/node-sass/.node-gyp/8.1.0
gyp WARN EACCES user "root" does not have permission to access the dev dir "/usr/local/lib/node_modules/@angular/cli/node_modules/node-sass/.node-gyp/8.1.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/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.1.0' ]
gyp verb install input version string "8.1.0"
gyp verb install installing version: 8.1.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.1.0

EDIT 3: Hmm, actually its just printing the above in an endless loop. :sweat_smile:

EDIT 4: Seems to extend from an error with node-gyp in node 8 & a permissioning issue in more recent builds.


Im also getting this behavior. Any update on this?


This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.