Tag: 退出代码

在命令行上运行cmd时,npm运行cmd失败

在我的HTTP状态检查项目中 : 如果我运行node_modules/.bin/jshint . 我得到: $ node_modules/.bin/jshint . test/inAdapters_fileAdapter.js: line 73, col 31, Missing semicolon. 1 error 它正确执行并产生预期的输出:1错误。 但是,如果我将这个命令添加到package.json中,并尝试通过npm run那么它将起作用并产生预期的输出,但是也会出现一些错误: $ npm run jshint > http-status-check@0.0.5 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 […]