Initially I was just going to post about how to install npm packages while offline, but in case I ever come back to update this page with more tips or package manages, this post is now titled “Package manager tips”.
npm tips
-
Configure initial values for
npm init -y
-
npm config set init.author.name YOUR_NAME npm config set init.author.email YOUR_EMAIL npm config set init.license UNLICENSED
-
-
Installing a package offline
- versions older than npm 5, use the local-npm package
-
npm install --prefer-offline
-
Update a package, e.g. Angular CLI
-
for before npm5:
npm uninstall -g @angular/cli npm cache verify
npm cache clean
-
npm install -g @angular/cli@latest
-
yarn tips
-
Configure initial values for
yarn init -y
-
yarn config set init-author-name YOUR_NAME yarn config set init-author-email YOUR_EMAIL yarn config set init-license UNLICENSED
-