Generate an auth token for your .npmrc
- remove your existing ~/.npmrc, since it won't override
- npm login
- copy to project directory
- never logout
npm logout
clears your token everywhere
- install and run generate-npm-token
- add it to your project .npmrc file
Resulting npmrc looks like so: //registry.npmjs.org/:_authToken=[your auth token]
To use yarn locally
- create .yarnc file
Resulting .yarnrc looks like so:
registry "https://registry.npmjs.org/"
Travis worked without the .yarnrc
file, somehow
Instead of sharing a token, you can add users in npm, but each user needs to have private modules
travis encrypt --add deploy.api_key [your auth token]