node.js - win7 grunt不是内部或外部命令。
PHP中文网
PHP中文网 2017-04-17 14:48:30
0
4
685


PATH:

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files(x86)\Novosoft\C2J\Bin;C:\Python34\Scripts;C:\Users\Administrator\AppData\Roaming\npm;C:\Program Files\mysql\mysql-5.6\bin;D:\Program Files\node\node_modules\npm;C:\Users\Administrator\AppData\Roaming\npm\;D:\Program Files\node\node_modules\node_modules\grunt\bin\;D:\Program Files\node\node_modules\node_modules\grunt-cli\bin\;D:\Program Files\node\node_modules\node_modules\grunt\

有什么问题吗

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(4)
伊谢尔伦

I solved this problem
Open

C:\Users(用户)\你的用户名\.npmrc 

Change this file
to

prefix=C:\Program Files\nodejs\node_modules
cache=C:\Program Files\nodejs\node_cache
registry = http://registry.cnpmjs.org

The first two are the two folders under the node installation path

黄舟

Did you open node command?
When using node under WIN, you cannot use the system's own cmd because there will be problems with environment variables

阿神


Picture taken from: Grunt Quick Start

大家讲道理

No problem, try installing something else


Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!