Description
npm install -g angular-cli failing with below error/logs:
- OS. Mac OSX (El Capitan)
- 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`