NPM Setup
- Install and configure "Node Version Manager" i.e.
nvm
- GitHub - nvm-sh/nvm: Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions - Use latest LTS version of NodeJS using nvm (right now it's Node v20.9.0(LTS))
a) To install a specific version of node runnvm install 20.9.0
b) To use specific version runnvm use v20.9.0
- Install
npmrc
- npm: npmrc - Create new profile
npmrc -c demoproject
- Run
npm config set registry https://project-path-url/
- Configure
~/.npmrc
registry=https://project-path-url/
always-auth=true
init.author.name=[AUTHOR]
init.author.email=[EMAIL]
init.author.url=https://project-path-url
email=[EMAIL]
_auth="[PWD]"
7.Password can be configured using env variable - Does NPM support encryption of the _auth property in .npmrc?
8.Run npm login
to get token. For password please contact admin.