我正在尝试将gulp集成到Visual Studio 2017中。在命令行上运行正常。但是,在VS2017的任务运行器资源管理器中,显示“加载失败,请查看输出窗口。”
输出窗口显示以下内容:
Failed to run "<ProjectPath>\Gulpfile.js"...
cmd.exe /c gulp --tasks-simple
<ProjectPath>\node_modules\node-sass\lib\binding.js:15
throw new Error(errors.missingBinary());
^
Error: Missing binding <ProjectPath>\node_modules\node-sass\vendor\win32-x64-47\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 5.x
Found bindings for the following environments:
- Windows 64-bit with Node.js 8.x
This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass --force` to build the binding for your current environment.
我尝试运行
npm rebuild node-sass --force
命令,但出现错误提示:Error: Can't find Python executable "C:\Python36\python.EXE", you can set the PYTHON env variable.
,我确认该文件已经存在。我不知道我还要深入探究多少了,这似乎是一个VS问题,因为在命令行中一切正常。我希望能够正确地让gulp集成到VS中。