1
votes

I'm having problems installing @ngrx/store

my set up:

node 8.9.3, npm 5.5.1, angular cli 1.7.4, angular 5.2.0

I'm using angular cli to create an angular app then installing @ngrx/store with

npm install @ngrx/store --save

This gives me the error

Error: EACCES: permission denied, access '/Users/chris.wright/node_modules/@ngrx/store'

If I run with sudo

sudo npm install @ngrx/store --save

I dont get an error but the @ngrx doesnt appear in the node_modules folder or in the package.json

Does anyone have any ideas what might be causing this or how I might install @ngrx/store

1
Silly, but are you sure you are running this from the package directory? - hlfrmn
Yes, I'm have run it from the package directory - ttmt
Other packages installing ok? Try inspecting the logs after running this: npm i @ngrx/store --loglevel verbose. Also you don't need --save on > npm version 4. - bc1105
What is your operating system? I get this error sometimes with VSCode and Windows 7/10. Simply relaunching vscode helps. Don't know why this happens. - Felix Lemke

1 Answers

-1
votes

Why don't you manually add these lines in the package.json and then npm install?

"dependencies": {
    "@ngrx/effects": "^5.2.0",
    "@ngrx/store": "^5.2.0",
    "@ngrx/store-devtools": "^5.2.0",

Given the information you have provided so far, this is my best advice. Sounds like a system related/node permission, so more information to Qs such as 'Do multiple users have write access to the current directory?' would be needed for more hints.