I'm trying to install my Ionic App through the registry with it's dependencies.
I try to achieve this with npm i --loglevel verbose
while my ~/.npmrc
looks like this:
//nexus.OMMITED.com/repository/:_auth=OMMITED
registry=http://nexus.OMMITED.com/repository/npm-all
always-auth=true
When watching the command run it seems to go just fine, until we hit other non-registry dependencies, suddenly I'm met with an authorisation error.
Here is a paste of the command: https://hasteb.in/hejigopo.sql
As you see it fails on @angular/[email protected]
in this instance, but this variables between random @angular
dependencies or @ionic-native
What I have tried so far...
always-auth
to true
or false
_authToken
instead of _auth
npm login --registry=http://nexus.OMMITED.com/repository/npm-all
with both --auth=TOKEN_OMITTED
and --authToken=TOKEN_OMITTED
where npm tells me npm WARN invalid config auth-type="TOKEN_OMITTED"
and prompts for a username, my username however is an email address which throws this error: npm WARN Name may not contain non-url-safe chars
only to infinitely keep prompting for another username.I don't know how, or why, but somehow it works now if I specify the full registry in the command likeso:
npm --registry=http://nexus.OMITTED.com/repository/npm-all/ install
While my ~/.npmrc
looks like this:
//nexus.OMITTED.com/repository/:_authToken=OMITTED
registry=http://nexus.OMITTED.com/repository/npm-all/
_auth=OMITTED
[email protected]
None of this makes sense to me whatsoever, but I'm glad it works for a change.
If anyone ends up writing a proper answer to this as to why this works, how this works and why the normal way doesn't, then I will gladly accept it as the answer and reward the bounty.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With