Skip to content
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

Response code 400 (Bad Request) #350

Closed
weekens opened this issue Feb 21, 2019 · 10 comments · Fixed by #356
Closed

Response code 400 (Bad Request) #350

weekens opened this issue Feb 21, 2019 · 10 comments · Fixed by #356

Comments

@weekens
Copy link

weekens commented Feb 21, 2019

On attempt to run release with np, I get:

$ npx np

✖ Response code 400 (Bad Request)

I expect to at lease get information on what was actually wrong. Currently, there is no such information and no possibility to get verbose output.

Private Git repository. Private NPM registry.

@itaisteinherz
Copy link
Collaborator

Is the bash output you included the full output of np, or did you leave some things out? It would be helpful if you included the entire stacktrace.
Also, which npm, Node.js and Git versions are you using?

@weekens
Copy link
Author

weekens commented Feb 22, 2019

I've included the full np output, that's the point.

The versions are:

$ npm --version
6.8.0
$ nodejs --version
v11.10.0
$ git --version
git version 2.17.1

@itaisteinherz
Copy link
Collaborator

This seems like an issue with npx and npm, as even if np had a bug you would still see the initial version prompt logged out. Try the solutions proposed in this issue.
@sindresorhus Do you have an idea on why this happens?

@sindresorhus
Copy link
Owner

No idea. When using a private npm registry, you're on your own to figure things out as a lot of things could potentially break. I'm happy to merge in fixes, but I have no ability or interest in testing against private registries.

@weekens
Copy link
Author

weekens commented Feb 23, 2019

@sindresorhus , but how's about implementing a possibility to enable verbose output from np? This way I could try to figure out things myself, and this would be in general a good option.

@itaisteinherz
Copy link
Collaborator

Adding a --verbose option wouldn't help here since, as I said, the issue isn't with np.

@itaisteinherz
Copy link
Collaborator

@weekens I just noticed #317, which looks similar to the issue you're facing. Can you try using [email protected], which worked for @jdziat?

I think that main issue here and in #317 is that when using a private registry, np should check if the package name is available on the given registry instead of on npm. We could also just disable the name check altogether when publishing to a private registry.

@weekens
Copy link
Author

weekens commented Feb 26, 2019

@itaisteinherz , [email protected] works fine.

@sindresorhus
Copy link
Owner

@itaisteinherz npm-name should already support checking the name for private packages: sindresorhus/npm-name@c4e850b

@itaisteinherz
Copy link
Collaborator

sindresorhus pushed a commit that referenced this issue Mar 15, 2019
This fixes the name check when publishing to a private registry by skipping it.

Fixes #350
Fixes #317
Closes #318
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants