0

I am getting errors while installing anuglar cli. I am working on the system which I don't have admin rights to. So, I followed below link to install node & npm & correct node & npm version is displayed in command prompt.

Install NodeJS & NPM without admin access

Error Image

This is the error I am getting while installing angular cli. I have tried many options from previous SO answers but nothing worked. I have given explicit full control to the myself on C:\NodeJS\NodeJS folder. What are the options now?

13
  • Did you have any cli instance running? try taskkill /t /f /im node.exe install, or restart your PC, try to uninstall and reinstall. Commented Apr 22, 2020 at 15:14
  • I tried to restart my PC every time I set the environment variable. Today also, I restarted my PC & first thing tried the angular cli install command. Still I got the same error & I haven't installed nodejs. Since I don't have admin rights, I have downloaded binaries. Commented Apr 22, 2020 at 15:16
  • You could try installing Angular CLI to a different location where you have access rights and set the PATH similar to NodeJS. Commented Apr 22, 2020 at 15:23
  • Run npm cache clean --force and try again Commented Apr 22, 2020 at 15:27
  • @MichaelD yes, I tried that too. Commented Apr 22, 2020 at 15:27

1 Answer 1

2

One workaround would be to switch to a directory you have rights to and run the installation command without the -g flag.

C:\Users\user>cd C:\npm-global
C:\npm-global>npm cache clean --force
C:\npm-global>npm install @angular/cli

And add the bin folder of node_modules to the user environment variable PATH.

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.