[Nodejs] NPM 想要deploy模組到NPM repository時 發生錯誤 You do not have permission to publish XXXX
今天想說把寫好的 nodejs module deploy 到 NPM 結果就報錯了 ,從錯誤訊息中完全誤會意思了XD
PS 如何上傳NPM 可以參考這一篇 https://blog.toright.com/posts/4874/%E5%A6%82%E4%BD%95%E7%99%BC%E4%BD%88%E4%BD%A0%E7%9A%84%E3%80%8C%E5%8C%85%E3%80%8D%E5%88%B0-npm-repository.html
好了進入正題
當輸入指令 npm publish
結果就throw some error :
npm ERR! code E403
npm ERR! 403 403 Forbidden - PUT https://registry.npmjs.org/bazooka - You do not have permission to publish "bazooka". Are you logged in as the correct user?
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy.
npm ERR! A complete log of this run can be found in:
npm ERR!
那麼起初以為是登入 add User 有問題,結果其實是專案名稱與其他人衝突了,去 package.json
去修改其中 name value , and try again , 如果再發生一樣的錯誤,可以先去 search npm , 是否有重複的 NPM module
留言
張貼留言