Globally configure NPM with a token registry to a specific scope (@organisation)

According to the official documentation you should be able to associate a scope with a registry when logging in. Is this what you want?

Did you try the following?

npm login --registry=https://reg.example.com --scope=@myco

If you dont want to login, but rather want to specify the token explicitly, the following should work:

npm config set @myco:registry https://reg.example.com
npm config set //reg.example.com/:_authToken xxxxxxxx

Note that the registry url must be normalized for this to work, ie it shouldn’t include scheme and must end with a slash.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)