-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
vue cli fails to get packages when npm is using a custom nexus npm registry #5411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Just got a quite similar problem with latest v4.4.1. I am mostly using the public npm registry, but have some vue plugins in a private registry based on the package scope.
I think i remember that it used to work at some point though... |
Ah, right. Because Vue CLI used to call |
Same issue here. Up. |
Seems we have a similar issue. The error is however a 406 Not Acceptable from Artifactory. We use an self-hosted artifactory to get our packages. When I use yarn or npm to install packages it works fine and I have set npm and yarn global config to use our internal Artifactory. Our Artifactory does not require authentication.
|
Fixed in v4.4.5 |
Awesome. Hope this will fix the issue for my use case. |
Can confirm everything is now working for me as expected, thanks! |
Initial testing with GitBash in Windows:
|
Seems still an authorization error (the request to https://artifactory.company.com/api/npm/npm/@vue/cli-plugin-babel returns a valid json but no actual metatdata fields like Have you run In v4.4.5 I tried to read the npm auth token from |
This implementation is consistent with the npm documentation, but may be not in line with the one implemented in yarn - it also checks upper level directories for |
If I go to the URL in the browser then I see the JSON:
|
npm and yarn registry in the global config point to the same host. |
What's the result of If the first one failed, then it's your registry does not support this accept header… Maybe I should also append |
Indeed the first request returns:
The second request with |
@abarke Fixed in v4.4.6 |
Sorry, but I still have the same problem as posted above @sodatea . |
@sodatea it's working for me now. Thanks for the fix. |
@bodograumann If the config in the |
Still failing for me in
I have a
Because we are using the Github package registry for private packages: But I can install plugins in the UI with no hassle. |
I got the same error :) |
3 similar comments
I got the same error :) |
I got the same error :) |
I got the same error :) |
This should fix the remaining issue reported in vuejs#5411. In particular, if the user configured a dedicated npm registry for a specific scope, this setting was previously disregarded by vue-cli. Thus it was impossible to use vue upgrade if the packages were not also published to the official npm registry.
This should fix the remaining issue reported in #5411. In particular, if the user configured a dedicated npm registry for a specific scope, this setting was previously disregarded by vue-cli. Thus it was impossible to use vue upgrade if the packages were not also published to the official npm registry.
I have the same issue with Nexus it looks like vue upgrade is not considering the _auth in .npmrc |
@mahermali, are you using at least version 4.5.7 of vue-cli? My changes in #5892 should have fixed the problem. |
@bodograumann I didn't see the new release I'm using 4.5.6 thanks I'll give it a try |
If people are running into this when using
|
Version
4.3.1
Environment info
Steps to reproduce
Add a custom registry which requires authentication in .npmrc, then use vue ui and check plugins/dependencies or try to upgrade a plugin with vue upgrade.
What is expected?
In the case of vue ui the current package version and details on the latest version should be displayed.
What is actually happening?
A 401 error is returned when checking the package in the registry, along with the error "Failed to get response from https://my-nexus-repository.com/repository/npm-proxy/the-package-name"
It looks to me like the registry value is taken from the .npmrc file but not the credentials included in the _auth string. I am not behind any proxy and am able to revert my registry to default settings as a workaround but would be much better if I could use this functionality without having to constantly change settings.
The text was updated successfully, but these errors were encountered: