[Nodejs] NPM 想要deploy模組到NPM repository時 發生錯誤 You do not have permission to publish XXXX

今天想說把寫好的 nodejs module deploy 到 NPM 結果就報錯了 ,從錯誤訊息中完全誤會意思了XD



好了進入正題 

當輸入指令 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

留言

這個網誌中的熱門文章

angular 如何Http 如何設定 CORS (Cross-Origin Resource Sharing)

Google Map 單車路徑計算坡度和角度小工具

Google URL Shortener API 快速教學