centos 私有 cnpm 服务器发布 registry error parsing json
发布于 8 年前 作者 MikeDGitHub 3322 次浏览 来自 问答

0 info it worked if it ends with ok 1 verbose cli [ ‘/usr/local/Cellar/node/6.3.1/bin/node’, 1 verbose cli ‘/usr/local/lib/node_modules/cnpm/node_modules/.bin/npm’, 1 verbose cli ‘–userconfig=/Users/wannian/.cnpmrc’, 1 verbose cli ‘–disturl=https://npm.taobao.org/mirrors/node’, 1 verbose cli ‘–registry=http://yuanxin.gitlab.com:7001/’, 1 verbose cli ‘publish’ ] 2 info using npm@3.10.6 3 info using node@v6.3.1 4 verbose publish [ ‘.’ ] 5 silly cache add args [ ‘.’, null ] 6 verbose cache add spec . 7 silly cache add parsed spec Result { 7 silly cache add raw: ‘.’, 7 silly cache add scope: null, 7 silly cache add escapedName: null, 7 silly cache add name: null, 7 silly cache add rawSpec: ‘.’, 7 silly cache add spec: ‘/Users/wannian/Downloads/helloword’, 7 silly cache add type: ‘directory’ } 8 verbose addLocalDirectory /Users/wannian/.npm/@my-company-name/helloworld/1.0.0/package.tgz not in flight; packing 9 verbose correctMkdir /Users/wannian/.npm correctMkdir not in flight; initializing 10 info lifecycle @my-company-name/helloworld@1.0.0~prepublish: @my-company-name/helloworld@1.0.0 11 silly lifecycle @my-company-name/helloworld@1.0.0~prepublish: no script for prepublish, continuing 12 verbose tar pack [ ‘/Users/wannian/.npm/@my-company-name/helloworld/1.0.0/package.tgz’, 12 verbose tar pack ‘/Users/wannian/Downloads/helloword’ ] 13 verbose tarball /Users/wannian/.npm/@my-company-name/helloworld/1.0.0/package.tgz 14 verbose folder /Users/wannian/Downloads/helloword 15 verbose addLocalTarball adding from inside cache /Users/wannian/.npm/@my-company-name/helloworld/1.0.0/package.tgz 16 verbose correctMkdir /Users/wannian/.npm correctMkdir not in flight; initializing 17 silly cache afterAdd @my-company-name/helloworld@1.0.0 18 verbose afterAdd /Users/wannian/.npm/@my-company-name/helloworld/1.0.0/package/package.json not in flight; writing 19 verbose correctMkdir /Users/wannian/.npm correctMkdir not in flight; initializing 20 verbose afterAdd /Users/wannian/.npm/@my-company-name/helloworld/1.0.0/package/package.json written 21 silly publish { name: ‘@my-company-name/helloworld’, 21 silly publish version: ‘1.0.0’, 21 silly publish description: ‘’, 21 silly publish main: ‘index.js’, 21 silly publish scripts: { test: ‘echo “Error: no test specified” && exit 1’ }, 21 silly publish author: ‘’, 21 silly publish license: ‘ISC’, 21 silly publish readme: ‘ERROR: No README data found!’, 21 silly publish _id: ‘@my-company-name/helloworld@1.0.0’, 21 silly publish _shasum: ‘b2ba840930b4b7ae831cf71975c1fa32e69ef139’, 21 silly publish _from: ‘.’ } 22 verbose getPublishConfig undefined 23 silly mapToRegistry name @my-company-name/helloworld 24 silly mapToRegistry scope (from package name) @my-company-name 25 verbose mapToRegistry no registry URL found in name for scope @my-company-name 26 silly mapToRegistry using default registry 27 silly mapToRegistry registry http://yuanxin.gitlab.com:7001/ 28 silly mapToRegistry data Result { 28 silly mapToRegistry raw: ‘@my-company-name/helloworld’, 28 silly mapToRegistry scope: ‘@my-company-name’, 28 silly mapToRegistry escapedName: ‘@my-company-name%2fhelloworld’, 28 silly mapToRegistry name: ‘@my-company-name/helloworld’, 28 silly mapToRegistry rawSpec: ‘’, 28 silly mapToRegistry spec: ‘latest’, 28 silly mapToRegistry type: ‘tag’ } 29 silly mapToRegistry uri http://yuanxin.gitlab.com:7001/@my-company-name%2fhelloworld 30 verbose publish registryBase http://yuanxin.gitlab.com:7001/ 31 silly publish uploading /Users/wannian/.npm/@my-company-name/helloworld/1.0.0/package.tgz 32 verbose request uri http://yuanxin.gitlab.com:7001/@my-company-name%2fhelloworld 33 verbose request sending authorization for write operation 34 info attempt registry request try #1 at 10:42:25 35 verbose request id 4e4d4b4e5047e8e3 36 http request PUT http://yuanxin.gitlab.com:7001/@my-company-name%2fhelloworld 37 http 500 http://yuanxin.gitlab.com:7001/@my-company-name%2fhelloworld 38 verbose bad json Internal Server Error 39 error registry error parsing json 40 verbose headers { ‘content-type’: ‘text/plain; charset=utf-8’, 40 verbose headers ‘content-length’: ‘21’, 40 verbose headers date: ‘Fri, 02 Sep 2016 02:42:25 GMT’, 40 verbose headers connection: ‘keep-alive’ } 41 info retry will retry, error on last attempt: SyntaxError: Unexpected token I in JSON at position 0 41 info retry Internal Server Error 42 info attempt registry request try #2 at 10:42:35 43 http request PUT http://yuanxin.gitlab.com:7001/@my-company-name%2fhelloworld 44 http 500 http://yuanxin.gitlab.com:7001/@my-company-name%2fhelloworld 45 verbose bad json Internal Server Error 46 error registry error parsing json 47 verbose headers { ‘content-type’: ‘text/plain; charset=utf-8’, 47 verbose headers ‘content-length’: ‘21’, 47 verbose headers date: ‘Fri, 02 Sep 2016 02:42:35 GMT’, 47 verbose headers connection: ‘keep-alive’ } 48 info retry will retry, error on last attempt: SyntaxError: Unexpected token I in JSON at position 0 48 info retry Internal Server Error 49 info attempt registry request try #3 at 10:43:35 50 http request PUT http://yuanxin.gitlab.com:7001/@my-company-name%2fhelloworld 51 http 500 http://yuanxin.gitlab.com:7001/@my-company-name%2fhelloworld 52 verbose bad json Internal Server Error 53 error registry error parsing json 54 verbose headers { ‘content-type’: ‘text/plain; charset=utf-8’, 54 verbose headers ‘content-length’: ‘21’, 54 verbose headers date: ‘Fri, 02 Sep 2016 02:43:35 GMT’, 54 verbose headers connection: ‘keep-alive’ } 55 verbose request invalidating /Users/wannian/.npm/yuanxin.gitlab.com_7001/_40my-company-name_252fhelloworld on PUT 56 error publish Failed PUT 500 57 verbose stack SyntaxError: Unexpected token I in JSON at position 0 57 verbose stack Internal Server Error 57 verbose stack at Object.parse (native) 57 verbose stack at CachingRegistryClient.<anonymous> (/usr/local/lib/node_modules/cnpm/node_modules/npm/node_modules/npm-registry-client/lib/request.js:199:23) 57 verbose stack at Request._callback (/usr/local/lib/node_modules/cnpm/node_modules/npm/node_modules/npm-registry-client/lib/request.js:172:14) 57 verbose stack at Request.self.callback (/usr/local/lib/node_modules/cnpm/node_modules/npm/node_modules/request/request.js:200:22) 57 verbose stack at emitTwo (events.js:106:13) 57 verbose stack at Request.emit (events.js:191:7) 57 verbose stack at Request.<anonymous> (/usr/local/lib/node_modules/cnpm/node_modules/npm/node_modules/request/request.js:1067:10) 57 verbose stack at emitOne (events.js:101:20) 57 verbose stack at Request.emit (events.js:188:7) 57 verbose stack at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/cnpm/node_modules/npm/node_modules/request/request.js:988:12) 58 verbose cwd /Users/wannian/Downloads/helloword 59 error Darwin 15.6.0 60 error argv “/usr/local/Cellar/node/6.3.1/bin/node” “/usr/local/lib/node_modules/cnpm/node_modules/.bin/npm” “–userconfig=/Users/wannian/.cnpmrc” “–disturl=https://npm.taobao.org/mirrors/node” “–registry=http://yuanxin.gitlab.com:7001/” "publish" 61 error node v6.3.1 62 error npm v3.10.6 63 error Unexpected token I in JSON at position 0 63 error Internal Server Error 64 error If you need help, you may report this error at: 64 error https://github.com/npm/npm/issues 65 verbose exit [ 1, true ]

2 回复

私有npm仓库推荐使用 sinopia,方便,快捷

@o6875461 一开始搭建也是sinopia这个,没找到怎么设置权限,还有只要加载配置文件就报错跑不起来了

回到顶部