5

I use npm publish return the error 400 Bad Request, I tried the method with next steps:

  • delete node_modules
  • npm cache clean -f
  • npm install
  • npm audit

But its not working. If you have the same trouble or solution method,please tell me,thanks!

My env is windows10: v18363.1198 node: v14.15.1 npm: v6.14.9

http fetch PUT 400 https://registry.npmjs.org/byte-download 1400ms
verbose stack Error: 400 Bad Request - PUT https://registry.npmjs.org/byte-download - Bad Request
verbose stack     at D:\Program Files\nodejs\node_global\node_modules\npm\node_modules\npm-registry-fetch\check-response.js:117:15
verbose stack     at processTicksAndRejections (internal/process/task_queues.js:93:5)
verbose statusCode 400
RobC
  • 22,977
  • 20
  • 73
  • 80
clark
  • 51
  • 2
  • 5
    I fund the reason, although my package name is not duplicate in npm, my package name contains `download` it seems that irregular, so I changed the name to `byte-to-file` and its work. – clark Nov 24 '20 at 01:16
  • I love you so much, I would have never figured that out on my own, god knows why npm chooses to just give you a cryptic error – Caltrop Jan 07 '21 at 13:07
  • Thank you so much! I was not able to find any documentation on this. But my package also contained the word "download" and this is apparently not allowed. – Seb Feb 23 '22 at 13:44

0 Answers0