-
-
Notifications
You must be signed in to change notification settings - Fork 11
404 error when the package has not been released #189
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
Ah! Thanks for this. I was just chatting with someone what the error was if it hadn't been published yet. The workflow I have been recommending is publishing a Looking at your error though, that version number seems to imply is has been published before? |
No, that was actually a dodgy copy and paste. That package has not been published. Would the workflow not be to just publish it if it does not exist or why would you need 0.0.0 to be there? |
(If you have the non-dodgy version, would be nice for future reference.) We are checking if it has been published and if it hasn't then run the publish for it. I believe with npm it fails and exits if the package does not exist yet, but doesn't exit if the package exists but that specific version number does not. (Working off of memory here.) I think there is probably room for better DX here, but I have been careful to address it as accidentally publishing something that the user doesn't want to be published is a pretty bad first use outcome. I think we would need to figure out how to circumvent or have a separate logic path just for the first publish. So the easy answer thus far was |
That is actually a very good point and I had not thought of that. Maybe just some warning or error message is the right thing here. Publishing |
What if you published to a target and the "dry-run" target was the default? That way, when you ran publish in your CI script you might say |
Hmm, I think we need to expand upon the idea of publish targets. @taras and I were chatting about this yesterday. We can abstract over the config for all of the standard situations, and rely on the config for the advanced use cases. Side note that this is a duplicate of #152, but keeping them both open since they have good information. |
I was having a quick look on my monorepo and I got a 404 error when running
npm covector publish
because it came across a package that had not been published yet.npm view
returns a 404 in that caseThe text was updated successfully, but these errors were encountered: