mjeanroy/bower-npm-resolver

Enable using a custom npm registry

danielvanmil opened this issue · 4 comments

The npm resolver does not take the registry in the .bowerrc into account. Is it possible to install artifacts from a different npm registry as https://registry.npmjs.org and how?

We'd want a different registry though, right? e.g. we have a custom bower registry specified but for this resolver specifically, I'd want to add a custom npm registry

So just an update, this works as expected (for me). I have a registry defined in .npmrc and the bower install is using this just fine (since it delegates to npm, it "just works"). So I'm good here for my use case 👍

I'm closing this issue since specifying registry in the .npmrc file is the way to go. Feel free to comment, or re-open the issue, if you disagree.

issue still actual
as i see npm-utils.js contains function wich delegates manifest resolving to 'pacote' package

...
function getManifest(pkg) {
return require('pacote').manifest(pkg).then(function (pkgJson) {
...

problems starts here. you doesnt pass second argument in function. But second argument is npm config object. So while you didnt specify this it will be default

this.registry = opts.registry || 'https://registry.npmjs.org'

And thats why .npmrc seems like ignored partly