-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
npm publish 404 Not Found - PUT #1637
Comments
Same error. Last release 30.07 was successful. But since 11.08 I get this error when publish: |
I was trying to Here is the relevant portion of the log when I tried to 19 verbose stack Error: 404 Not Found - PUT https://registry.npmjs.org/mock-fs - Not found
19 verbose stack at /Users/tschaub/.nvm/versions/node/v14.8.0/lib/node_modules/npm/node_modules/npm-registry-fetch/check-response.js:117:15
19 verbose stack at processTicksAndRejections (internal/process/task_queues.js:93:5)
20 verbose statusCode 404
21 verbose pkgid mock-fs@4.13.0
22 verbose cwd /Users/tschaub/projects/mock-fs
23 verbose Darwin 19.6.0
24 verbose argv "/Users/tschaub/.nvm/versions/node/v14.8.0/bin/node" "/Users/tschaub/.nvm/versions/node/v14.8.0/bin/npm" "publish"
25 verbose node v14.8.0
26 verbose npm v6.14.8
27 error code E404
28 error 404 Not Found - PUT https://registry.npmjs.org/mock-fs - Not found
29 error 404
30 error 404 'mock-fs@4.13.0' is not in the npm registry.
31 error 404 You should bug the author to publish it (or use the name yourself!)
32 error 404 Note that you can also install from a
33 error 404 tarball, folder, http url, or git url.
34 verbose exit [ 1, true ] |
Yeah, |
Hitting this issue too. Honestly I've had so many bugs / problems with npm and registries. It's a comedy of errors. Right now I just did a login, removed all tokens, created a new one. Updated my .npmrc then did an which works properly. Then an npm publish gives me "not found". I have to remove the .npmrc then do an npm login and then it works. The problem is that this completely breaks our release process and we can't use a CI system for our releases. NPM... you need to take these issues seriously. They really negatively impact your brand. Bugs like this and SO many in one area shouldn't exist. Either remove the features or fix them. |
Have you tried with npm 7? |
@ljharb I haven't ... could try that. was being lazy on upgrading 👍 |
Also getting this error in my CI, I'm using token for login and trying to publish package which was previously published, still got 404: CI run Using npm v6.14.10 |
i fixed my problem by adding tags pattern |
I'm experiencing the same problem recently. First I thought I messed up my CI, but when I manually login to github packages using my personal access token I get the same error. My process:
When i run
UPDATENevermind, I had an outdated repository URL and package name in my package.json. Updating that fixed the Error. But getting a 404 most definitely did not make that clear in any way. |
Hi DId someone proceed with this error in CI? I came across the same error in GitHubActions. This is how workflow looks like
|
On Monday, this was working. Today I am not getting 404 errors on publish from a GH Action. UPDATE: Explicitly adding the config value of |
workaround from npm/cli#1637 (comment)
I received a 404 until I provided a |
The note above IntelliJ flagged me for the following |
I had this issue.. Turned out I have renamed the repo and although there are redirects in place to view code etc you do need the updated repo name in order to publish into the package repository |
Hi @rgparkins, we do have the same issue at the moment. After renaming our repository, publishing fails both locally and in GitHub workflows. Could you please give us more details on how you fixed that issue? We updated every occurrence of the old repo URL but still getting this problem... |
@jasonkuhrt did you ever figure this out? |
I was having the
With the In the end the fix seemed to be making a new "team" in the organisation and assigning myself and my package to this. |
This continues to be a serious show stopping issue GITHUB PLZ TAKE NOTICE all publishing is halted and broken at this time
|
In my case the problem was that I had multiple Running |
Had my problem because of 'name' in package.json as just repo name, not @YOUR-USERNAME/YOUR-REPOSITORY |
Same issue, have tried all the solutions above, not work. |
This is what works for me:
How I found out:
|
I've got this "E404 Not Found" and "is not in registry" error too so I tried this and it worked for me. My original repository name (without @USERNAME/ in front of it) seemed to be already taken, although there were no search results on npmjs.com for my repository name. After changing my repository name to another, it worked with |
@RootDev4 sorry I missed you message... have a look at our repo, it may help |
check your publishConfig |
Hopefully this fixes the NPM Publish workflow failing due to a 404 error. npm/cli#1637 (comment)
Same issue. I found the reason. In npm version 2 or greater, if your package is the prefix @, e.g. https://docs.npmjs.com/about-scopes |
you saved my day 👍👍👍 |
This unhelpful error is also thrown for wrong credentials, double check the token you have set in the GitHub secrets. My issue was that I was setting the token without the prefix |
This mad error gave me headache for hours till i abruptly changed my repository name yo |
Adding to this. I had the same problem in my github actions pipeline ( 404 Not Found ) and it was due to me not using the correct npm secret. |
change publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: git checkout $CI_COMMIT_REF_NAME
- run: npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
- run: npm config set scope "@tenado"
- run: SPACE_CHAR=" "
- run: npx standard-version --releaseCommitMessageFormat "chore(release):${SPACE_CHAR}{{currentTag}}"
- run: git push --follow-tags origin $CI_COMMIT_REF_NAME
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}} to publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: |
git checkout $CI_COMMIT_REF_NAME
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
npm config set scope "@tenado"
SPACE_CHAR=" "
npx standard-version --releaseCommitMessageFormat "chore(release):${SPACE_CHAR}{{currentTag}}"
git push --follow-tags origin $CI_COMMIT_REF_NAME
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}} then, you can publish success~ |
It looks like I ran into this issue because I used the env var did not work: - name: Publish 🚀
shell: bash
run: pnpm publish packages/components --access public --no-git-checks
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} works: - name: Publish 🚀
shell: bash
run: pnpm publish packages/components --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
changing field |
I had this error because the url I was using in the registry field in the .npmrc file was |
Hopefully this allows pnpm publish (aka npm publish) to properly use the npm token in AUTH_NODE_TOKEN without any additional setup. see npm/cli#1637 see pnpm/pnpm#4937
The nearest issue is #1626 but it's about using npm to get package, and it look solved for most user.
Here it's about npm publishing package in CI, and it's not solved for now.
Current Behavior:
https://framagit.org/1000i100/g1lien/-/jobs/1072053
Expected Behavior:
Successful publish of my package from docker in gitlab-CI with npm_token authentication.
(it works yesterday on my laptop with npm login, but not with npm_token in CI).
Steps To Reproduce:
ex. steps to reproduce the behavior:
It should reproduce the problem.
Environment:
https://framagit.org/1000i100/g1lien/-/blob/master/.gitlab-ci.yml#L5
https://framagit.org/1000i100/g1lien/-/jobs/1072052#L17
The text was updated successfully, but these errors were encountered: