search

Home  >  Q&A  >  body text

node.js - win7 grunt不是内部或外部命令。


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中文网2776 days ago699

reply all(4)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-04-17 14:50:30

    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

    reply
    0
  • 黄舟

    黄舟2017-04-17 14:50:30

    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

    reply
    0
  • 阿神

    阿神2017-04-17 14:50:30


    Picture taken from: Grunt Quick Start

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 14:50:30

    No problem, try installing something else


    reply
    0
  • Cancelreply