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/获得了很多帮助。我也会尝试。 –