我比平时更加谨慎,因为我npm对过去的行为感到困惑.
我在Mac上,并通过安装的node.js brew install node.
现在我想jslint.js在命令行上运行作为命令,jslint我发现完成此操作的规范方法是sudo npm install -g jslint使用此输出成功运行:
$ sudo npm install -g jslint
npm http GET https://registry.npmjs.org/jslint
npm http 200 https://registry.npmjs.org/jslint
npm http GET https://registry.npmjs.org/jslint/-/jslint-0.1.9.tgz
npm http 200 https://registry.npmjs.org/jslint/-/jslint-0.1.9.tgz
npm http GET https://registry.npmjs.org/nopt
npm http 200 https://registry.npmjs.org/nopt
npm http GET https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz
npm http 200 https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz
npm http GET https://registry.npmjs.org/abbrev
npm http 200 https://registry.npmjs.org/abbrev
npm http GET https://registry.npmjs.org/abbrev/-/abbrev-l.0.4.tgz
npm http 200 https://registry.npmjs.org/abbrev/-/abbrev-1.0.4.tgz
/usr/local/share/npm/bin/jslint -> /usr/local/share/npm/lib/node_modules/jslint/
bin/jslint.js
jslint@0.1.9 /usr/local/share/npm/lib/node_modules/jslint
??? …Run Code Online (Sandbox Code Playgroud) 我在尝试使用bower(安装基础5)或在命令行上获得与工作相关的任何凉亭时遇到了巨大的问题.
我安装了
我成功跑了
npm install -g bower grunt-cli
gem install foundation
Run Code Online (Sandbox Code Playgroud)
这些都运行良好.我查看了npm/node_modules目录,我可以bower在那里看到文件夹.
我每次键入bower要么进入cmd,ruby cmd或者git bash我得到
命令无法识别
我在环境变量中设置了git路径.
什么令人讨厌的是凉亭网站上的指令.它指出:
npm install -g bower
bower install
Run Code Online (Sandbox Code Playgroud)
这不行!
我已成功安装了nodejs,并表达了框架,但我下载了bower via
npm install -g bower
Run Code Online (Sandbox Code Playgroud)
哪个成功了.
但是每当我尝试用凉亭安装东西时,我都会收到错误消息
bower is not recognised as an internal or external command
Run Code Online (Sandbox Code Playgroud)
当我在电脑上搜索bower或bower.exe时,我无法找到它.
我执行时似乎得到了以下内容 npm install bower -g
/usr/local/share/npm/bin/bower -> /usr/local/share/npm/lib/node_modules/bower/bin/bower
bower@0.8.6 /usr/local/share/npm/lib/node_modules/bower
Run Code Online (Sandbox Code Playgroud)
不幸的是,执行任何bower命令都会返回 -bash: bower: command not found
which npm返回/usr/local/bin/npm并运行which node返回/usr/local/bin/node.