1
我正在嘗試出版範圍的NPM包artifactory的,我得到了以下錯誤:Artifactory的NPM發佈失敗PUT 404
npm ERR! registry error parsing json
npm ERR! publish Failed PUT 404
npm ERR! Darwin 15.4.0
npm ERR! argv "/usr/local/Cellar/node4-lts/4.6.2/bin/node" "/usr/local/bin/npm" "publish"
npm ERR! node v4.6.2
npm ERR! npm v2.15.9
npm ERR! Unexpected token <
npm ERR! <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
npm ERR! <html><head>
npm ERR! <title>404 Not Found</title>
npm ERR! </head><body>
npm ERR! <h1>Not Found</h1>
npm ERR! <p>The requested URL /artifactory/api/npm/npm-local/@acres/acresmetajs was not found on this server.</p>
npm ERR! <hr>
npm ERR! <address>Apache/2.2.31 (Amazon) Server at artifacts.company.com Port 80</address>
npm ERR! </body></html>
我已經建立了我的.npmrc文件方式如下:
registry=http://artifacts.company.com/artifactory/api/npm/npm-local/
_auth="mypassword"
always-auth=true
[email protected]
@acres:registry=http://artifacts.company.com/artifactory/api/npm/npm-local/
//artifacts.company.com/artifactory/api/npm/npm-local/:_password=mypassword
//artifacts.company.com/artifactory/api/npm/npm-local/:username=myusername
//artifacts.company.com/artifactory/api/npm/npm-local/:[email protected]
//artifacts.company.com/artifactory/api/npm/npm-local/:always-auth=true
我運行npm發佈和npm發佈 - 註冊http://artifacts.company.com/artifactory/api/npm/npm-local/並得到這個相同的錯誤。我錯過了什麼?
我得到相同的異常。 – Daniel
丹尼爾我剛剛添加了一個適合我的答案。如果你支持maven這可能是你的問題。我從https://github.com/npm/npm/issues/獲得了很多幫助。我也會嘗試。 –