question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

404 error while publishing packages that already exist

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
Andaristcommented, Sep 11, 2021

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: https://github.com/changesets/action/pull/110

1reaction
ianstormtaylorcommented, Mar 31, 2021

For any others running into this…

  • Although it shows a 404 this is actually a permissions error on the NPM side of things, meaning something in the authentication isn’t properly working. (https://github.com/npm/cli/issues/1637)
  • Turns out that although the logs were printing that it was using https://registry.npmjs.org, you still need to manually set the registry_url key in the actions/setup-node action for this to work. (https://github.com/actions/setup-node/issues/82)

Once you fix that it works just fine.

Read more comments on GitHub >

github_iconTop Results From Across the Web

404 error while publishing packages that already exist #550
I'm trying to get Changesets setup for Slate using a --snapshot release on a dev tag, but running in to problems.
Read more >
Getting 404 when attempting to publish new package to NPM
When i try to publish in console by login with normal username gave me this error. publish Failed PUT 404 npm ERR! code...
Read more >
404 error after a successful publish - MSDN - Microsoft
A 404 is a file not found error and has nothing to do with authentication. Have you verified the file exists? If the...
Read more >
Receive 404 error when trying to npm publish instead of 401
The NPM software may not access the URL & GitLab doesn't want to disclose that the given URL exists or not. It returns...
Read more >
Index Β· Npm registry Β· Packages Β· User Β· Help Β· GitLab
If you try to publish a package with a name that already exists within a given scope, you get a 403 Forbidden! error....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found