NPM Setup

NPM Setup
  1. 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
  2. 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 run nvm install 20.9.0
    b) To use specific version run nvm use v20.9.0
  3. Install npmrc - npm: npmrc
  4. Create new profile npmrc -c demoproject
  5. Run npm config set registry https://project-path-url/
  6. 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.

Read more