-
Notifications
You must be signed in to change notification settings - Fork 746
搭建私有库报错error parse json #830
Comments
返回500了,看看服务是否记录了错误日志 |
cnpmjs.org下没找到日志文件? |
帮忙解决下 |
你怎么启动的服务,日志目录默认是在 |
找到了 config.js里没有设logs选项,添加了logs,看到错误信息 |
是cdn的事么? |
nfs 必须要有,默认是存本地文件的 |
存本地不行吗? 我也遇到一样的问题 nfs设置的为null |
@kevenfeng 说了默认是存本地的,不要设置成 null,看一下文档 https://github.com/cnpm/cnpmjs.org/wiki/NFS-Guide |
能不能不要在这里面的文档中写null啊!把人带坑里面去了,至少做个详细点的注释把!汗 https://github.com/cnpm/cnpmjs.org/wiki/Deploy |
不过你能回复 还是挺感激 我把那行去掉了就行了! |
我将 https://github.com/cnpm/cnpmjs.org/wiki/Deploy 里面的 nfs: null 配置删除了。 |
赞 |
/home/www/test2$ sudo cnpm publish ==> error
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/lib/node_modules/cnpm/node_modules/.bin/npm',
1 verbose cli '--userconfig=/home/dd/.cnpmrc',
1 verbose cli '--disturl=https://npm.taobao.org/mirrors/node',
1 verbose cli '--cache=/home/dd/.cnpm',
1 verbose cli '--registry=http://localhost:7001/',
1 verbose cli '--node-gyp=/usr/local/lib/node_modules/cnpm/node_modules/node-gyp/bin/node-gyp.js',
1 verbose cli 'publish' ]
2 info using [email protected]
3 info using [email protected]
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 name: null,
7 silly cache add rawSpec: '.',
7 silly cache add spec: '/home/www/test2',
7 silly cache add type: 'directory' }
8 verbose addLocalDirectory /home/dd/.cnpm/@trillers/test2/1.0.0/package.tgz not in flight; packing
9 verbose correctMkdir /home/dd/.cnpm correctMkdir not in flight; initializing
10 verbose tar pack [ '/home/dd/.cnpm/@trillers/test2/1.0.0/package.tgz',
10 verbose tar pack '/home/www/test2' ]
11 verbose tarball /home/dd/.cnpm/@trillers/test2/1.0.0/package.tgz
12 verbose folder /home/www/test2
13 info prepublish @trillers/[email protected]
14 verbose addLocalTarball adding from inside cache /home/dd/.cnpm/@trillers/test2/1.0.0/package.tgz
15 verbose correctMkdir /home/dd/.cnpm correctMkdir not in flight; initializing
16 silly cache afterAdd @trillers/[email protected]
17 verbose afterAdd /home/dd/.cnpm/@trillers/test2/1.0.0/package/package.json not in flight; writing
18 verbose correctMkdir /home/dd/.cnpm correctMkdir not in flight; initializing
19 verbose afterAdd /home/dd/.cnpm/@trillers/test2/1.0.0/package/package.json written
20 silly publish { name: '@trillers/test2',
20 silly publish version: '1.0.0',
20 silly publish description: '',
20 silly publish main: 'index.js',
20 silly publish scripts: { test: 'echo "Error: no test specified" && exit 1' },
20 silly publish author: '',
20 silly publish license: 'ISC',
20 silly publish dependencies: { co: '^4.6.0' },
20 silly publish readme: 'ERROR: No README data found!',
20 silly publish _id: '@trillers/[email protected]',
20 silly publish _shasum: 'fd272471c0647cb0896d0b23a345ae3629f1d4b2',
20 silly publish _from: '.' }
21 verbose getPublishConfig undefined
22 silly mapToRegistry name @trillers/test2
23 silly mapToRegistry scope (from package name) @trillers
24 verbose mapToRegistry no registry URL found in name for scope @trillers
25 silly mapToRegistry using default registry
26 silly mapToRegistry registry http://localhost:7001/
27 silly mapToRegistry uri http://localhost:7001/@trillers%2ftest2
28 verbose publish registryBase http://localhost:7001/
29 silly publish uploading /home/dd/.cnpm/@trillers/test2/1.0.0/package.tgz
30 verbose request uri http://localhost:7001/@trillers%2ftest2
31 verbose request sending authorization for write operation
32 info attempt registry request try #1 at 9:41:51 PM
33 verbose request id f37da4d4c7fcfcd8
34 http request PUT http://localhost:7001/@trillers%2ftest2
35 http 500 http://localhost:7001/@trillers%2ftest2
36 verbose bad json Internal Server Error
37 error registry error parsing json
38 verbose headers { 'content-type': 'text/plain; charset=utf-8',
38 verbose headers 'content-length': '21',
38 verbose headers date: 'Wed, 17 Feb 2016 02:41:51 GMT',
38 verbose headers connection: 'keep-alive' }
39 info retry will retry, error on last attempt: SyntaxError: Unexpected token I
39 info retry Internal Server Error
40 info attempt registry request try #2 at 9:42:01 PM
41 http request PUT http://localhost:7001/@trillers%2ftest2
42 http 500 http://localhost:7001/@trillers%2ftest2
43 verbose bad json Internal Server Error
44 error registry error parsing json
45 verbose headers { 'content-type': 'text/plain; charset=utf-8',
45 verbose headers 'content-length': '21',
45 verbose headers date: 'Wed, 17 Feb 2016 02:42:01 GMT',
45 verbose headers connection: 'keep-alive' }
46 info retry will retry, error on last attempt: SyntaxError: Unexpected token I
46 info retry Internal Server Error
47 info attempt registry request try #3 at 9:43:01 PM
48 http request PUT http://localhost:7001/@trillers%2ftest2
49 http 500 http://localhost:7001/@trillers%2ftest2
50 verbose bad json Internal Server Error
51 error registry error parsing json
52 verbose headers { 'content-type': 'text/plain; charset=utf-8',
52 verbose headers 'content-length': '21',
52 verbose headers date: 'Wed, 17 Feb 2016 02:43:01 GMT',
52 verbose headers connection: 'keep-alive' }
53 verbose request invalidating /home/dd/.cnpm/localhost_7001/_40trillers_252ftest2 on PUT
54 error publish Failed PUT 500
55 verbose stack SyntaxError: Unexpected token I
55 verbose stack Internal Server Error
55 verbose stack at Object.parse (native)
55 verbose stack at CachingRegistryClient. (/usr/local/lib/node_modules/cnpm/node_modules/npm/node_modules/npm-registry-client/lib/request.js:199:23)
55 verbose stack at Request._callback (/usr/local/lib/node_modules/cnpm/node_modules/npm/node_modules/npm-registry-client/lib/request.js:172:14)
55 verbose stack at Request.self.callback (/usr/local/lib/node_modules/cnpm/node_modules/npm/node_modules/request/request.js:199:22)
55 verbose stack at emitTwo (events.js:87:13)
55 verbose stack at Request.emit (events.js:172:7)
55 verbose stack at Request. (/usr/local/lib/node_modules/cnpm/node_modules/npm/node_modules/request/request.js:1036:10)
55 verbose stack at emitOne (events.js:82:20)
55 verbose stack at Request.emit (events.js:169:7)
55 verbose stack at IncomingMessage. (/usr/local/lib/node_modules/cnpm/node_modules/npm/node_modules/request/request.js:963:12)
56 verbose cwd /home/www/test2
57 error Linux 3.13.0-32-generic
58 error argv "/usr/local/bin/node" "/usr/local/lib/node_modules/cnpm/node_modules/.bin/npm" "--userconfig=/home/dd/.cnpmrc" "--disturl=https://npm.taobao.org/mirrors/node" "--cache=/home/dd/.cnpm" "--registry=http://localhost:7001/" "--node-gyp=/usr/local/lib/node_modules/cnpm/node_modules/node-gyp/bin/node-gyp.js" "publish"
59 error node v4.2.3
60 error npm v2.14.19
61 error Unexpected token I
61 error Internal Server Error
62 error If you need help, you may report this error at:
62 error https://github.com/npm/npm/issues
63 verbose exit [ 1, true ]
config.js
~/.cnpmrc
package to publish
The text was updated successfully, but these errors were encountered: