Our company has set up a private npm registry for our packages. We are trying to set up an angular2 application and all angular packages that are included (from the angular2 tutorial page) are scoped. The issue is while npm is set to our private registry, an
npm ERR! Linux 4.4.8-boot2docker
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v4.3.0
npm ERR! npm v2.14.12
npm ERR! code E404
npm ERR! 404 no such package available : @angular/core
npm ERR! 404
npm ERR! 404 '@angular/core' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'search-ui'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! Please include the following file with any support request:
npm ERR! /tmp/npm-debug.log
As NPM says in the documentation, all private packages are scoped, and scopes can be associated to custom registries.
So, if your private package is
@myPrivateScope/aPrivatePackage, your problem could be solved by adding the following line to the .npmrc file on the root of your project:
Where the url after the equals sign is the address to your private registry.
You can find other ways to do this association and more information about it on https://docs.npmjs.com/misc/scope#associating-a-scope-with-a-registry