npm / npme-installer

npm Enterprise installer
https://www.npmjs.com/enterprise
Other
35 stars 21 forks source link

Dependency on an NPMe #149

Closed gusdaud-zz closed 8 years ago

gusdaud-zz commented 8 years ago

I'm having a similar issue. My package.json dependencies uses something that's in a NPMe

"dependencies": {
  "@myscope/mypackage": "0.0.1"

This NPMe repository address is set the NPM config.

npm config set @myrepo:registry http://200.168.7.1

(although main registry entry in npm config still points to official public repo)

When I do npm install I'm getting this error:

'@myscope/mypackage' is not in the npm registry.

Shouldn't NPM be also looking for this package in the NPMe repository when I do npm install ?

ps I'm using npm version 3.10.5

gusdaud-zz commented 8 years ago

I documenting @nexdrew response here to help others:

That being said, make sure the scope you use in your package name matches one that is mapped to your registry in .npmrc (looks like your comment has a typo in the npm config command, should use @myscope:registry instead of @myrepo:registry).

Also make sure you are routing your registry address to port 8080 on the npm Enterprise host (the registry service currently binds to port 8080).

Other than that, what type of authentication are you using? Do you have read access to the repo listed in @myscope/mypackage's package.json (under repository > url)? Do you have the Auth Scoped Installs setting enabled in the admin console?

gusdaud-zz commented 8 years ago

Solved by creating a .npmrc file with:

@myrepo:registry="http://200.168.7.1:8081"

And in package.json dependencies:

"@myrepo/mypackage": "*",

Thanks!