在Windows上运行grunt.cmd的多个问题

Eri*_*c C 7 windows node.js gruntjs

我不得不修改grunt.cmd,因为我的系统路径非常错误:

本来:

%~dp0\Application Data\npm\node_modules\grunt

哪个会打印:

\\dacwnas\Profiles\<user>\Application Data\npm\Application Data\npm\node_modules\grunt

运行grunt.cmd会抛出一个找不到模块的错误.更改它以%~dp0\node_modules\grunt"删除错误.

但是,grunt.cmd --version在Windows中运行什么也没输出.它只是暂停一会儿并返回空白命令行.

我正在运行Windows 7 64位,命令行以管理员身份运行

las*_*boy 1

你安装了 grunt-cli 吗?

我的 grunt.cmd 内容如下所示:

:: Created by npm, please don't edit manually.
@IF EXIST "%~dp0\node.exe" (
  "%~dp0\node.exe"  "%~dp0\node_modules\grunt-cli\bin\grunt" %*
) ELSE (
   node  "%~dp0\node_modules\grunt-cli\bin\grunt" %*
)
Run Code Online (Sandbox Code Playgroud)