javascript - `npm run jshint` results in `missing script: jshint` -
i'm trying jshint few javascript files, reason local npm install of jshint isn't working.
the package there:
$ npm list --depth=0 testapp@1.0.0 /users/me/workspace/testapp └── jshint@2.9.3
and error following:
$ npm run jshint npm err! darwin 15.4.0 npm err! argv "/usr/local/cellar/node/5.6.0/bin/node" "/usr/local/bin/npm" "run" "jshint" npm err! node v5.6.0 npm err! npm v3.6.0 npm err! missing script: jshint npm err! npm err! if need help, may report error at: npm err! <https://github.com/npm/npm/issues> npm err! please include following file support request: npm err! /users/me/workspace/testapp/npm-debug.log
i can work around global install, i'd prefer have working locally.
according the documentation npm run
alias npm run-script
, runs 1 of scripts
in package.json
file. if add jshint
script entry package.json
, should run locally-installed jshint
:
{ "name": ..., "version": ..., "scripts": { "jshint": "jshint" } }
Comments
Post a Comment