Skip to content

Error code 1 when installing Angular CLI #345

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
cwramsey opened this issue Mar 24, 2016 · 38 comments
Closed

Error code 1 when installing Angular CLI #345

cwramsey opened this issue Mar 24, 2016 · 38 comments

Comments

@cwramsey
Copy link
Contributor

This is a bug report.

When trying to install Angular CLI, I'm getting the errors listed below.

This did not happen about 3 weeks ago when I first installed it, but it does now.

OS

OSX El Capitan

Versions

Node v5.2.0
NPM 3.3.12

How I found the error

I simply ran npm i -g --save angular-cli. There were errors about lodash being expired (because a half billion modules use an outdated lodash.) and a reference to padleft that you can see at the top of the log below. For all I know that version of lodash used the leftpad module that caused all the ruckus recently. That's just a guess, but it's breaking the build.

Error

install:lodash.padlef ▌ ╢███████████
postinstall:lodash._baset ▄ ╢█████████
postinstall:npmlog        ▐ ╢██████████
postinstall:mime-db → lif ▄ ╢█████████
postinstall:validate-npm- ▌ ╢█████████
> [email protected] postinstall /usr/local/lib/node_modules/angular-cli/node_modules/broccoli
> multidep test/multidep.json

postinstall:underscore.st ▌ ╢█████████
broccoli-plugin 1.0.0: Installing
module.js:329
    throw err;
    ^

Error: Cannot find module 'config-chain'
    at Function.Module._resolveFilename (module.js:327:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:355:17)
    at require (internal/module.js:13:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/angular-cli/node_modules/npm/lib/config/core.js:2:10)
    at Module._compile (module.js:399:26)
    at Object.Module._extensions..js (module.js:406:10)
    at Module.load (module.js:345:32)
    at Function.Module._load (module.js:302:12)
    at Module.require (module.js:355:17)
Error: npm exited with exit code 1, signal null
    at ChildProcess.<anonymous> (/usr/local/lib/node_modules/angular-cli/node_modules/multidep/index.js:90:28)
    at emitTwo (events.js:88:13)
    at ChildProcess.emit (events.js:173:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:201:12)
postinstall:underscore.st ▌ ╢████████████████
npm WARN install:[email protected] [email protected] postinstall: `multidep test/multidep.json`
npm WARN install:[email protected] Exit status 1
postinstall               ▄ ╢█████████████
executeActions → rollback ▄ ╢███████████████████
executeActions → rollback ▌ ╢███████████████████
runTopLevelLifecycles     ▌ ╢███████████████████
/usr/local/lib
└── (empty)

runTopLevelLifecycles     ▌ ╢████████████████
npm ERR! code 1
@scatcher
Copy link

I'm having a similar issue which looks to be occurring around the same point "[email protected] postinstall".

OSX El Capitan
Node v5.7.0
NPM 3.8.2

@jkuri
Copy link
Contributor

jkuri commented Mar 24, 2016

Thats interesting, I don't have that issue on similar versions than you. Can you just try to re-run install again or if it's possible provide more info about reproducing this. Thanks.

@pinalbhatt
Copy link

Me too getting error with "[email protected] "
[Issue seems to be only with v0.0.27, 0.0.26 is installing fine. ]

`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.
npm WARN deprecated [email protected]: This package has been discontinued in favor of lodash@^4.0.0.
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.10
npm ERR! path /Users/user1/.npm/broccoli-plugin/1.0.0/package/package.json.40f3f354e3332ce831a21d4907afdfd3
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall open

npm ERR! Error: EACCES: permission denied, open '/Users/user1/.npm/broccoli-plugin/1.0.0/package/package.json.40f3f354e3332ce831a21d4907afdfd3'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES: permission denied, open '/Users/user1/.npm/broccoli-plugin/1.0.0/package/package.json.40f3f354e3332ce831a21d4907afdfd3']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'open',
npm ERR! path: '/Users/user1/.npm/broccoli-plugin/1.0.0/package/package.json.40f3f354e3332ce831a21d4907afdfd3' }
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/npm-debug.log
npm ERR! code 1`

@filipesilva
Copy link
Contributor

Hm... I tried it myself and had some trouble. Then I did npm cache clean and it seemed to be ok. Can I ask you to try doing that as well?

@pinalbhatt
Copy link

@filipesilva tried after cleaning cache but no success.

@scatcher
Copy link

@filipesilva Cleaning cache didn't help here either. While trying to debug I also noticed that if I simply run "npm install -g [email protected]" I received the same error which seems to point at broccoli as the issue.

@filipesilva
Copy link
Contributor

Huh.... really odd. I wonder how I could get a working version of brocolli but not not you guys....

@pinalbhatt
Copy link

haha... thats what is alfa release.... since last couple of days i am trying to make angular-cli and angularfire2 work. But finally decided to configure angularfire2 manually.

@wolfie82
Copy link

[email protected] works for me.

OSX 10.11.4
NPM 3.7.3
Node v5.9.1

❯ ng -v
angular-cli: 0.0.27
node: 5.9.1
os: darwin x64

@tedpark
Copy link

tedpark commented Mar 25, 2016

Me too getting error with "[email protected] "
[email protected] not working.
but 0.0.26 is fine.

ted@TedMac ~> npm install -g angular-cli
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.
npm WARN deprecated [email protected]: This package has been discontinued in favor of lodash@^4.0.0.
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/Cellar/node/5.9.1/bin/node" "/usr/local/lib/node_modules/angular-cli/node_modules/.bin/npm" "install" "[email protected]"
npm ERR! node v5.9.1
npm ERR! npm v2.14.10
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package [email protected] does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants eslint@^2.2.0

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 1, signal null
at ChildProcess. (/usr/local/lib/node_modules/angular-cli/node_modules/multidep/index.js:90:28)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
/usr/local/lib
└── (empty)

npm ERR! Darwin 15.4.0
npm ERR! argv "/usr/local/Cellar/node/5.9.1/bin/node" "/usr/local/bin/npm" "install" "-g" "angular-cli"
npm ERR! node v5.9.1
npm ERR! npm v3.7.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/ted/npm-debug.log
npm ERR! code 1

@tedpark
Copy link

tedpark commented Mar 25, 2016

Works like charm!

npm install eslint -g
npm install jslint -g

angular-cli: 0.0.27
node: 5.9.1
os: darwin x64

@anode7
Copy link

anode7 commented Mar 25, 2016

@pinalbhatt @tedpark I encountered the same problem. I found the solution on the official website (EACCES error):
https://docs.npmjs.com/getting-started/fixing-npm-permissions

@cwramsey
Copy link
Contributor Author

@filipesilva running npm cache clean fixed the problem. It installed 0.0.27 without any trouble. Perhaps broccoli has updated whatever was causing the bug.

@scatcher
Copy link

Running npm cache clean didn't resolve for me but fixing npm permissions per recommendation from @anode7 did resolve the problem.

@anode7
Copy link

anode7 commented Mar 25, 2016

@scatcher Now you can download a package globally without using sudo and (EACCESS) error free

@filipesilva
Copy link
Contributor

@anode7 good catch! I should have remembered that OSX sometimes has those sudo issues.

Is anyone still having issues with install?

@anode7
Copy link

anode7 commented Mar 25, 2016

@filipesilva also on Ubuntu (the path prefix to npm's directory is just /usr)

After this fix , be sure not to use "sudo" to install a -g package , also for an update of npm :
npm install npm -g

@filipesilva
Copy link
Contributor

Good tips!

I'm closing the issue but if someone has the same problem again, I'll reopen.

@oYo-fr
Copy link

oYo-fr commented Apr 5, 2016

I'm having the same problem...
I'm running that thing in docker and it fails :(

Here is an extract of my docker file:

`FROM node:latest

USER root
RUN npm install -g protractor
RUN npm install -g angular-cli`

Here is the output:

`> [email protected] postinstall /usr/local/lib/node_modules/angular-cli/node_modules/broccoli

multidep test/multidep.json

broccoli-plugin 1.0.0: Installing
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info attempt registry request try #1 at 2:22:41 PM
npm http request GET https://registry.npmjs.org/broccoli-plugin
npm http 200 https://registry.npmjs.org/broccoli-plugin
npm info retry fetch attempt 1 at 2:22:42 PM
npm info attempt registry request try #1 at 2:22:42 PM
npm http fetch GET https://registry.npmjs.org/broccoli-plugin/-/broccoli-plugin-1.0.0.tgz
npm http fetch 200 https://registry.npmjs.org/broccoli-plugin/-/broccoli-plugin-1.0.0.tgz
npm ERR! Linux 4.1.19-boot2docker
npm ERR! argv "/usr/local/bin/node" "/usr/local/lib/node_modules/angular-cli/node_modules/.bin/npm" "install" "broccoli-
[email protected]"
npm ERR! node v5.10.0
npm ERR! npm v2.14.21
npm ERR! path /root/.npm/broccoli-plugin/1.0.0/package
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall mkdir

npm ERR! Error: EACCES: permission denied, mkdir '/root/.npm/broccoli-plugin/1.0.0/package'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES: permission denied, mkdir '/root/.npm/broccoli-plugin/1.0.0/package']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/root/.npm/broccoli-plugin/1.0.0/package' }
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:100:13)
at ChildProcess.emit (events.js:185:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
npm info lifecycle [email protected]~postinstall: Failed to exec postinstall script
/usr/local/lib
`-- (empty)

npm ERR! Linux 4.1.19-boot2docker
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "angular-cli"
npm ERR! node v5.10.0
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! /root/npm-debug.log
npm ERR! code 1
#`

I tried the fix with the user rights, but it still fails.

@anode7
Copy link

anode7 commented Apr 5, 2016

I'm having the same problem...

I'm running that thing in docker and it fails :(

Here is an extract of my docker file:

`FROM node:latest

USER root

you should not install it as ROOT user

@oYo-fr
Copy link

oYo-fr commented Apr 5, 2016

I think I tried with and without root... and you can also see this in the logs:
npm ERR! Please try running this command again as root/Administrator.

@filipesilva
Copy link
Contributor

Hey @oYo-fr, I think #345 (comment) is spot on. Your issue looks like a permissions issue.

Basically what happens both on OSX and Linux is that once you install any global or local npm package with sudo, you have to install them all.

But in the case of broccolli, it is using multidep to install some extra packages himself - and without sudo.

So the advice for these issues is roughly the same... you need to either change permissions, or remove all the global/relevant local node_modules and reinstall packages without sudo.

@oYo-fr
Copy link

oYo-fr commented Apr 6, 2016

Thx for the help...

I've tried the folowwing with Kitematik on Windows (Docker):

  • created a new docker container based on official "node" (so I guess, it's a fresh install),
  • ran this command right away : npm install -g angular-cli

it failed due to permissions (EACCES) on broccoli :-(

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

broccoli-plugin 1.0.0: Installing
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info attempt registry request try #1 at 8:56:23 AM
npm http request GET https://registry.npmjs.org/broccoli-plugin
npm http 200 https://registry.npmjs.org/broccoli-plugin
npm info retry fetch attempt 1 at 8:56:23 AM
npm info attempt registry request try #1 at 8:56:23 AM
npm http fetch GET https://registry.npmjs.org/broccoli-plugin/-/broccoli-plugin-1.0.0.tgz
npm http fetch 200 https://registry.npmjs.org/broccoli-plugin/-/broccoli-plugin-1.0.0.tgz
npm ERR! Linux 4.1.19-boot2docker
npm ERR! argv "/usr/local/bin/node" "/usr/local/lib/node_modules/angular-cli/node_modules/.bin/npm" "install" "broccoli-
[email protected]"
npm ERR! node v5.10.0
npm ERR! npm v2.14.21
npm ERR! path /root/.npm/broccoli-plugin/1.0.0/package
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall mkdir

npm ERR! Error: EACCES: permission denied, mkdir '/root/.npm/broccoli-plugin/1.0.0/package'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES: permission denied, mkdir '/root/.npm/broccoli-plugin/1.0.0/package']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/root/.npm/broccoli-plugin/1.0.0/package' }
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:100:13)
at ChildProcess.emit (events.js:185:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
npm info lifecycle [email protected]~postinstall: Failed to exec postinstall script
/usr/local/lib
`-- (empty)

npm ERR! Linux 4.1.19-boot2docker
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "angular-cli"
npm ERR! node v5.10.0
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! /npm-debug.log

I also tried changing de permissions on a brand new container using these commands :
chown -R $(whoami) /usr/local/lib/node_modules
chown -R $(whoami) /usr/local/bin
chown -R $(whoami) /usr/local/share
chown -R $(whoami) /root

...with no luck...

I have no other packages installed (at least I guess), as I am starting from scratch with a new docker each time...

Last byt not list : my npm versions are these :

npm -v

3.8.3

node -v

v5.10.0

@jkuri
Copy link
Contributor

jkuri commented Apr 6, 2016

@oYo-fr from you error log: Please try running this command again as root/Administrator. Did you try that?

Otherwise try fixing npm permissions before installing angular-cli as they suggest here.

@oYo-fr
Copy link

oYo-fr commented Apr 6, 2016

I tried as root (see a few commands above). But Anode7 said I should run that as root... Anyway I tried with and without root, always with no success.
I also tried to change the folders permissions (see my previous comment):
chown -R $(whoami) /usr/local/lib/node_modules
chown -R $(whoami) /usr/local/bin
chown -R $(whoami) /usr/local/share
chown -R $(whoami) /root

without any luck either...

@jkuri
Copy link
Contributor

jkuri commented Apr 6, 2016

What was the exit status of changing the permissions? Almost sure that chown -R $(whoami) /root won't work just like that, also not sure about previous chowns. Please follow the npm instructions about changing permissions.
You definitely have permissions issue and it is not related to angular-cli.

@oYo-fr
Copy link

oYo-fr commented Apr 6, 2016

jkuri, thx for your answer.

I guess all of you are right about the permissions issue. I just don't have any idea about how to fix that easily, and this issue is probably more "broccoli-related" thant "angular-cli" related... but I have tried so many things without any success...

The thing is that even with the explanations given in the tutorial, I'm not able to install that thing as easily as the other npm packages...
Probably someone (who?) should try to reproduce that problem. It's really easy : docker + official node image + "npm install -g angular-cli"...
I'm quite sad because I wanted so badly to try angular 2 + material 2, but I'm stuck right at the beginning... I probably should wait for all of this to be released for good... Without any clear instructions, I suppose I won't be able (or have the time) to find out how to do that :(
Sadly, I think I'll try some other technologies for now, and come back and try again in a few weeks

@jkuri
Copy link
Contributor

jkuri commented Apr 6, 2016

Not really sure why do you need docker to try angular-cli + material2.

@oYo-fr
Copy link

oYo-fr commented Apr 6, 2016

because I just want to understand what I do... If I do all of these commands on my computer every time, maybe one day it will work, but I'll not know why. How could I know that the last command I tried worked on it's own, or because I tried something else one week ago ?
At least with docker, I have a clean fresh install each time to run my tests...

@filipesilva
Copy link
Contributor

Hm... regarding the chown, I noticed the error is in non of those directories...

npm ERR! Error: EACCES: permission denied, mkdir '/root/.npm/broccoli-plugin/1.0.0/package'

Can you maybe try chown recursively on /root/.npm/?

@anode7
Copy link

anode7 commented Apr 6, 2016

Are you are sure not to throw your docker container in ROOT ?
Did you add a user to your docker container ?
this user has permissions on the npm directory ? (option2)

@jek-bao-choo
Copy link

@anode7 advice is really good. Check out his recommendation

I found the solution on the official website (EACCES error):
https://docs.npmjs.com/getting-started/fixing-npm-permissions

@n1alloc
Copy link

n1alloc commented Jun 1, 2016

Guys, I uninstalled angular-cli as I had originally installed it globally with sudo.
Then, I made sure that the owner permissions were reset correctly so that I did have root access.
Then I reinstalled angular-cli without sudo (i.e. npm install -g angular-cli), installation went fine.

Then I try to initiate a new project again (ng new projectName) and I get the same error again.

This is the error:

Error: EACCES: permission denied, open '/Users/username/.config/configstore/ember-cli.json'
You don't have access to this file.

What's going on?
How do I resolve this?
Haven't even reached the point of running 'ng serve' yet....

Also, brew and node and npm were updated.

@filipesilva
Copy link
Contributor

@n1alloc that file must be a remnant for the old instalation (angular-cli is based on ember-cli). You can delete it.

@jurerick
Copy link

jurerick commented May 5, 2018

The solution posted by @anode7 works for me. https://docs.npmjs.com/getting-started/fixing-npm-permissions

@developer1011
Copy link

@VictorChirita
Copy link

Also it could be an incompatible package for that operating system installed in the node_modules folder.
I wanted to run a ng build command on a Linux x64 machine that had the node_modules folder originally uploaded on git from a windows x64 machine.
Obviously didn't work. Solution was to remove the node_modules from repository and then re-run the build which obviously now downloaded the correct node_modules.

@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 8, 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