我正在嘗試運行nodeschool.io練習。我無法運行他們的軟件包。NPM -bash命令未找到
第一包我裝:
$ npm install -g learnyounode
$ learnyounode
運行包用命令learnyounode
每隔包在其網站上我嘗試安裝,不能用在正確的命令運行程序命令行,例如:
$ npm install -g [email protected]
$ /Users/name/npm/bin/functional-javascript -> /Users/name/npm/lib/node_modules/functional-javascript-workshop/functional-javascript.js
/Users/name/npm/bin/functional-javascript-workshop -> /Users/name/npm/lib/node_modules/functional-javascript-workshop/functional-javascript.js
[email protected] /Users/name/npm/lib/node_modules/functional-javascript-workshop
├── [email protected] ([email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
$ functional-javascript-workshop
$ -bash: functional-javascript-workshop: command not found
這裏是一個包,我想在這個例子中,安裝的鏈接:functional-javascript-workshop
正如你所看到的,我收到消息 -bash - command not found
看着有類似問題的其他職位,我跑以下命令來看看我的路徑和包被保存:
$ which node
$ /usr/local/bin/node
$ which npm
$ /usr/local/bin/npm
$PATH
$ Users/name/.rbenv/shims:/Users/name/.rbenv/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin: No such file or directory
步驟I嘗試:
- 卸載/重新安裝節點使用釀造命令
- 全球更新NPM的($ NPM更新-g)
它看起來像被安裝在/Users/name/npm/lib/node_modules
我的節點模塊我不知道怎麼雖然給我的命令行訪問或尋找到了這條道路的方式命令來啓動程序。
如果你嘗試' export PATH = $ PATH:/ Users/name/npm/bin'有幫助嗎? – mccannf 2014-09-30 16:41:48