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

404 error while publishing packages that already exist #550

Closed
ianstormtaylor opened this issue Mar 30, 2021 · 5 comments
Closed

404 error while publishing packages that already exist #550

ianstormtaylor opened this issue Mar 30, 2021 · 5 comments

Comments

@ianstormtaylor
Copy link
Contributor

I'm trying to get Changesets setup for Slate using a --snapshot release on a dev tag, but running in to problems.

For some reason it's failing with a 404 not finding the existing packages? Even though the npm info lines clearly succeeded it still fails later on. The lines in question:

🦋  error  'slate@0.0.0-2021230191014' is not in the npm registry.
🦋  error You should bug the author to publish it (or use the name yourself!)
🦋  error 
🦋  error Note that you can also install from a
🦋  error tarball, folder, http url, or git url.
🦋  error an error occurred while publishing slate-react: E404 Not Found - PUT https://registry.npmjs.org/slate-react - Not found 
🦋  slate@0.0.0-2021230191014

And the full log (link to action):

Run yarn changeset version --snapshot
  yarn changeset version --snapshot
  yarn changeset publish --tag dev
  shell: /usr/bin/bash -e {0}
  env:
    GITHUB_TOKEN: ***
    NPM_TOKEN: ***
    NODE_AUTH_TOKEN: ***
yarn run v1.22.5
$ /home/runner/work/slate/slate/node_modules/.bin/changeset version --snapshot
🦋  All files have been updated. Review them and commit at your leisure
Done in 0.54s.
yarn run v1.22.5
$ /home/runner/work/slate/slate/node_modules/.bin/changeset publish --tag dev
Package "slate-packages" must depend on the current version of "slate": "0.0.0-2021230191014" vs "*"
Package "slate-packages" must depend on the current version of "slate-history": "0.0.0-2021230191014" vs "*"
Package "slate-packages" must depend on the current version of "slate-hyperscript": "0.0.0-2021230191014" vs "*"
Package "slate-packages" must depend on the current version of "slate-react": "0.0.0-2021230191014" vs "*"
🦋  warn ===============================IMPORTANT!===============================
🦋  warn Packages will be released under the dev tag
🦋  warn ----------------------------------------------------------------------
🦋  info npm info slate
🦋  info npm info slate-history
🦋  info npm info slate-hyperscript
🦋  info npm info slate-react
🦋  info slate is being published because our local version (0.0.0-2021230191014) has not been published on npm
🦋  info slate-history is being published because our local version (0.0.0-2021230191014) has not been published on npm
🦋  info slate-hyperscript is being published because our local version (0.0.0-2021230191014) has not been published on npm
🦋  info slate-react is being published because our local version (0.0.0-2021230191014) has not been published on npm
🦋  info Publishing "slate" at "0.0.0-2021230191014"
🦋  info Publishing "slate-history" at "0.0.0-2021230191014"
🦋  info Publishing "slate-hyperscript" at "0.0.0-2021230191014"
🦋  info Publishing "slate-react" at "0.0.0-2021230191014"
🦋  error an error occurred while publishing slate-history: E404 Not Found - PUT https://registry.npmjs.org/slate-history - Not found 
🦋  error 
🦋  error  'slate-history@0.0.0-2021230191014' is not in the npm registry.
🦋  error You should bug the author to publish it (or use the name yourself!)
🦋  error 
🦋  error Note that you can also install from a
🦋  error tarball, folder, http url, or git url.
🦋  error an error occurred while publishing slate-hyperscript: E404 Not Found - PUT https://registry.npmjs.org/slate-hyperscript - Not found 
🦋  error 
🦋  error  'slate-hyperscript@0.0.0-2021230191014' is not in the npm registry.
🦋  error You should bug the author to publish it (or use the name yourself!)
🦋  error 
🦋  error Note that you can also install from a
🦋  error tarball, folder, http url, or git url.
🦋  error an error occurred while publishing slate: E404 Not Found - PUT https://registry.npmjs.org/slate - Not found 
🦋  error 
🦋  error  'slate@0.0.0-2021230191014' is not in the npm registry.
🦋  error You should bug the author to publish it (or use the name yourself!)
🦋  error 
🦋  error Note that you can also install from a
🦋  error tarball, folder, http url, or git url.
🦋  error an error occurred while publishing slate-react: E404 Not Found - PUT https://registry.npmjs.org/slate-react - Not found 
🦋  slate@0.0.0-2021230191014
🦋  error 
🦋  slate-history@0.0.0-2021230191014
🦋  error  'slate-react@0.0.0-2021230191014' is not in the npm registry.
🦋  error You should bug the author to publish it (or use the name yourself!)
🦋  error 
🦋  error Note that you can also install from a
🦋  error tarball, folder, http url, or git url.
🦋  error packages failed to publish:
🦋  slate-hyperscript@0.0.0-2021230191014
🦋  slate-react@0.0.0-2021230191014
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Process completed with exit code 1.
@ianstormtaylor
Copy link
Contributor Author

ianstormtaylor commented Mar 31, 2021

For any others running into this...

Once you fix that it works just fine.

estrattonbailey added a commit to front-of-house/presta that referenced this issue Jul 7, 2021
@estrattonbailey
Copy link

Hey y'all 👋 I'm having the same issue and I think I'm stumped. I've tried everything suggested here and in the other threads linked above but I still get the 404 PUT error, even for non-scoped packages i.e. presta.

Here's an example of the build logs, and here's my Github action. FWIW I also tried combinations of disabling 2FA and using a "publish" npm token for additional permissions, but no dice, so I'm back to a normal "automation" token workflow.

I've been referencing other projects like tinyhttp (and Slate), but looks like they've been having the same issues.

Seems like we're all super close to getting this working — maybe there's something simple I can help debug? Unsure where to start 🤔

@estrattonbailey
Copy link

estrattonbailey commented Aug 24, 2021

Just following up 👋 still running into this (on a new project this time, just set everything up). Looks like tinyhttp is still having the same issues as well — see issue in the Changesets action changesets/action#98

I've tried some of the suggestions of creating my own .npmrc as well, but no luck. Seems like the outlier in my case is my usage of pnpm, could that be the culprit?

So sorry to ping you directly, @Andarist, I know you must have a million notifications. Any ideas?

@estrattonbailey
Copy link

Following up: I was able to get this working, see changesets/action#98 (comment)

@Andarist
Copy link
Member

I've already posted this in the mentioned GitHub action's issue but since the last messages here refer to this problem I have thought that it might be worth mentioning it here as well.

I've created a PR that should, hopefully, help with @estrattonbailey's case here: changesets/action#110

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

No branches or pull requests

3 participants