npmrc's are npm config files (used by other package manager as well).
npmrc can be configured per project, per user, or globally.
Use it to configure your scope owner name on Bit Cloud as a scoped registry. That will enable you to install your components using npm or Yarn.
$npm config set '@my-bit-org-or-username:registry' https://node-registry.bit.cloud
To set it manually choose the .npmrc file to modify:
- per-project config file
/path/to/my/project/.npmrc - per-user config file
~/.npmrc - global config file
$PREFIX/etc/npmrc - npm builtin config file
/path/to/npm/npmrc
@my-bit-org-or-username:registry=https://node-registry.bit.cloud
@teambit:registry=https://node-registry.bit.cloud
//node-registry.bit.cloud/:_authToken=BIT_CLOUD_AUTH_TOKEN
always-auth=true
@teambit:registry=https://node-registry.bit.cloud
//node-registry.bit.cloud/:_authToken=BIT_CLOUD_AUTH_TOKEN
always-auth=true
When running bit login the .npmrc file is updated with the _authToken. However, there could be cases where a bit login is not executed (for example, on a remote CI).
In these cases, you can set the _authToken value manually. Get the Bit token from a logged-in machine, by running bit config get user.token.
@teambit should also be configured to get access to Bit dependencies.