我最近采用了NPM来执行自动Jenkins任务,但是当我尝试运行我的脚本时,我面临这个“权限被拒绝”的错误,如下所示
$ npm run check
> ./node_modules/jshint/bin/jshint --reporter ./node_modules/jshint-stylish/index.js test/* lib/*
sh: 1: ./node_modules/jshint/bin/jshint: Permission denied
npm ERR! my-service@1.12.6 check: `./node_modules/jshint/bin/jshint --reporter ./node_modules/jshint-stylish/index.js test/* lib/*`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the my-service@1.12.6 check script.
npm ERR! This is most likely a problem with the my-service package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ./node_modules/jshint/bin/jshint --reporter ./node_modules/jshint-stylish/index.js test/* lib/*
npm ERR! You can get their info via:
npm ERR! npm owner ls my-service
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.13.0-48-generic
npm ERR! command "/var/lib/jenkins/.nvm/v0.10.40/bin/node" "/var/lib/jenkins/.nvm/v0.10.40/bin/npm" "run" "check"
npm ERR! cwd /jenkins/jobs/my-service-development-check/workspace
npm ERR! node -v v0.10.40
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /jenkins/jobs/my-service-development-check/workspace/npm-debug.log
npm ERR! not ok code 0