Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to setup npm environment variables in windows

i have a Windows machine. i need to setup the npm private profile to accept private packages for my code. my dev team has provided only a hexadecimal token for the setup. The npm documentation describes to use the token like this export NPM_TOKEN="00000000-0000-0000-0000-000000000000". but windows machine is not accepting this command.

can anyone help me on setting the npm token in a windows 10 laptop.

like image 581
Abhijit Avatar asked Mar 26 '18 10:03

Abhijit


1 Answers

You can do this:

  • In Windows search bar: Start typing something like variables or environment var and click on the Edit environment variables for your account entry
  • In the opened window click on New... button in User variables section.
  • Variable name: NPM_TOKEN
  • Variable value: 00000000-0000-0000-0000-000000000000 (use your own token)
  • Save and restart computer

It should be done

like image 114
Seb33300 Avatar answered Sep 29 '22 15:09

Seb33300