我得到command not found...
上的bin模塊我在我的package.json中定義了模塊。 爲什麼?我認爲它應該自動將本地命令映射到路徑中。npm package.json已定義的bin模塊 - 找不到命令
在我模塊的package.json:
"bin": {
"testme": "./misc/testme"
},
./misc/testme腳本:
#!/usr/bin/env node
console.log("this is a test");
它出現在node_modules/.bin文件目錄
$ ls node_modules/.bin
acorn escodegen gulp kue-dashboard ncp semver stylus
cake esgenerate gzip-size lessc nopt shjs testme
cleancss esparse handlebars make-plural pretty-bytes sshpk-conv uglifyjs
coffee esvalidate image-size messageformat rc sshpk-sign user-home
dateformat express jade mime retrieve-arguments sshpk-verify uuid
dot-object geojsonhint jsonlint mkdirp rimraf strip-indent watchr
errno grunt js-yaml mustache sails strip-json-comments which
但是,當我運行它時npm install
,我得到:
$ testme
bash: testme: command not found...