我已經在npmjs.com上創建了一個帳戶,我也正在使用命令行(linux)的how-to-npm教程。我正處於應該發佈測試模塊的階段。不過,我不斷收到錯誤:爲什麼我無法將我的軟件包發佈到npmjs
You must sign up for private packages : @zentech/node
這些都是錯誤時NPM發佈
npm ERR! publish Failed PUT 402
npm ERR! Linux 4.10.0-33-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "publish"
npm ERR! node v4.7.2
npm ERR! npm v3.5.2
npm ERR! code E402
npm ERR! You must sign up for private packages : @zentech/node
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /home/george/node/npm-debug.log
我的package.json文件
{
"name": "@zentech/node",
"version": "1.0.1",
"main": "index.js",
"preferGlobal": true,
"scripts": {
"test": "node test.js"
},
"author": "",
"license": "ISC",
"description": "",
"repository": "http://github.com/zentech/node"
}
沒有人知道爲什麼這個錯誤嗎?感謝
這個錯誤怎麼樣不清楚?看起來你還沒有註冊私人包裹。如果你想使用私人包,你必須註冊。 –
chech這個鏈接https://stackoverflow.com/questions/41981686/getting-error-402-while-publishing-package-using-npm – skr