5

I was trying to do environment setup for Angular2 and for that I am getting below mentioned error while using command : npm install

enter image description here

I am having Node versions : Node version is v6.7.0, npm version is 3.10.3

Is there any solution for the same?

4
  • Nirav, Can you please try running your CMD as an administrator using the Run As Administrator and see if it works? Commented Nov 7, 2016 at 6:05
  • Yes,have tried with Admin access.Still it is having same issue Commented Nov 7, 2016 at 6:28
  • Can you please try executing npm set registry https://registry.npmjs.org/ before executing your npm install command? Commented Nov 7, 2016 at 6:33
  • If the above is not working in your case, you will have to upgrade your node and npm to the latest Commented Nov 7, 2016 at 6:34

5 Answers 5

5

Solved the issue.

There was an issue with Windows System settings.

Steps to solve the issue:

Go to Windows' Settings >> Network & Internet >> Proxy Go to Automatic proxy setup >> Make 'Automatically detect settings' to off.

Now this works for me.

Thanks

Sign up to request clarification or add additional context in comments.

1 Comment

but our organization disable this setting and option defaulted to On. We can not change it. is there a work round for this?
2

I have worked in react and I was tried to hit command npm install and I have found same above problem.

Solution is:

Check the latest update of npm:

npm install npm@next -g

Comments

2

This is my error (Windows 10)

enter image description here

This is my solution:

Deleting the C:\Users\{user}\AppData\Roaming\npm and

Deleting the C:\Users\{user}\AppData\Roaming\npm-cache folder

Done! It should work!

Comments

1

I found two solutions for this problem.

SOLUTION 1

If you are on Windows 10 go to settings (go to start and type settings). Go to Network And Internet > Go To The Proxy tab Available on the left sidebar > under this tab you will find a setting called Automatically Detect Settings > Simply turn it off...

You are done and good to go .....

SOLUTION 2

Deleting the C:\Users\{user}\AppData\Roaming\npm and Then

Deleting the C:\Users{user}\AppData\Roaming\npm-cache folder

You are done....

Comments

0

Initially this problem can occur due to node version. See if you're using multiple node version with your machine. If yes, you should also have nvm with you. Do nvm use latest (if up to date version is also installed) or use nvm user v16.18.0 (for example considering this is the latest/ other node version you have). Then try to install other things.

You need to use cmd with admin access to change node version using nvm.

Thanks,

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.