Skip to content

npm install -g angular-cli failing #372

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pinalbhatt opened this issue Mar 30, 2016 · 6 comments
Closed

npm install -g angular-cli failing #372

pinalbhatt opened this issue Mar 30, 2016 · 6 comments

Comments

@pinalbhatt
Copy link

npm install -g angular-cli failing with below error/logs:

  1. OS. Mac OSX (El Capitan)
  2. Versions.
    node : 4.4.1
    npm : 2.14.21

`user1$ sudo npm install -g angular-cli
npm WARN deprecated [email protected]: This package has been discontinued in favor of lodash@^4.0.0.
npm WARN deprecated [email protected]: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
/usr/local/bin/ng -> /usr/local/lib/node_modules/angular-cli/bin/ng

[email protected] postinstall /usr/local/lib/node_modules/angular-cli/node_modules/broccoli
multidep test/multidep.json

broccoli-plugin 1.0.0: Installing
npm ERR! Darwin 15.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/lib/node_modules/angular-cli/node_modules/.bin/npm" "install" "[email protected]"
npm ERR! node v4.4.1
npm ERR! npm v2.14.21
npm ERR! path /Users/user1/.npm/broccoli-plugin/1.0.0
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall mkdir

npm ERR! Error: EACCES: permission denied, mkdir '/Users/user1/.npm/broccoli-plugin/1.0.0'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES: permission denied, mkdir '/Users/user1/.npm/broccoli-plugin/1.0.0']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/Users/user1/.npm/broccoli-plugin/1.0.0' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR! /usr/local/lib/node_modules/angular-cli/node_modules/broccoli/test/multidep/broccoli-plugin-1.0.0/npm-debug.log
Error: npm exited with exit code 243, signal null
at ChildProcess. (/usr/local/lib/node_modules/angular-cli/node_modules/multidep/index.js:90:28)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
/usr/local/lib
└── (empty)

npm ERR! Darwin 15.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "angular-cli"
npm ERR! node v4.4.1
npm ERR! npm v3.8.3
npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: multidep test/multidep.json
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'multidep test/multidep.json'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the broccoli package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! multidep test/multidep.json
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs broccoli
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls broccoli
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/user1/Projects/ngcli/npm-debug.log
npm ERR! code 1`

@filipesilva
Copy link
Contributor

It sounds like a permissions problem. Have you tried the solution proposed in this comment #345 (comment) ?

It is true that the log points at broccoli as being the culprit, but this seems to be mostly because it uses multidep (and that installs deps).

@pinalbhatt
Copy link
Author

Thanks @filipesilva
Finally was able to install angular-cli.
was able to resolve EACCESS issue by Change npm's default directory to another directory. (https://docs.npmjs.com/getting-started/fixing-npm-permissions )

@pinalbhatt
Copy link
Author

@filipesilva you can close this ticket.

@filipesilva
Copy link
Contributor

Glad I was able to help!

@felixala
Copy link

For me sudow works!
sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants