In my HTTP状态检查项目 https://github.com/guyellis/http-status-check:
如果我跑node_modules/.bin/jshint .
I get:
$ node_modules/.bin/jshint .
test/inAdapters_fileAdapter.js: line 73, col 31, Missing semicolon.
1 error
它正确执行并产生预期的输出:1 个错误。
但是如果我将该命令添加到 package.json 并尝试运行它npm run
然后它会工作并产生预期的输出,但也会出现一堆错误:
$ npm run jshint
> [email protected] /cdn-cgi/l/email-protection jshint /home/guy/source/http-status-check
> jshint .
test/inAdapters_fileAdapter.js: line 73, col 31, Missing semicolon.
1 error
npm ERR! Linux 3.13.0-24-generic
npm ERR! argv "node" "/home/guy/local/bin/npm" "run" "jshint"
npm ERR! node v0.10.31
npm ERR! npm v2.0.0
npm ERR! code ELIFECYCLE
npm ERR! [email protected] /cdn-cgi/l/email-protection jshint: `jshint .`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] /cdn-cgi/l/email-protection jshint script.
npm ERR! This is most likely a problem with the http-status-check package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! jshint .
npm ERR! You can get their info via:
npm ERR! npm owner ls http-status-check
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/guy/source/http-status-check/npm-debug.log
这是它在 package.json 中的定义方式:
"scripts": {
"jshint": "node_modules/.bin/jshint .",
},
我做错了什么?