【发布时间】:2017-04-12 06:37:18
【问题描述】:
打开 Visual Studio Task Runner Explorer 时,gulpfile.js 无法加载,并且在“输出”窗口中发出此错误。
Failed to run "C:\DATA\Git\MyApp\MyBiz.MyApp\MyBiz.MyApp.WebsiteCore\Gulpfile.js"...
cmd.exe /c gulp --tasks-simple
C:\DATA\Git\MyApp\MyBiz.MyApp\MyBiz.MyApp.WebsiteCore\node_modules\node-sass\lib\binding.js:15
throw new Error(errors.missingBinary());
^
Error: Missing binding C:\DATA\Git\MyApp\MyBiz.MyApp\MyBiz.MyApp.WebsiteCore\node_modules\node-sass\vendor\win32-ia32-47\binding.node
Node Sass could not find a binding for your current environment: Windows 32-bit with Node.js 5.x
Found bindings for the following environments:
- Windows 64-bit with Node.js 6.x
This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass` to build the binding for your current environment.
at module.exports (C:\DATA\Git\MyApp\MyBiz.MyApp\MyBiz.MyApp.WebsiteCore\node_modules\node-sass\lib\binding.js:15:13)
at Object.<anonymous> (C:\DATA\Git\MyApp\MyBiz.MyApp\MyBiz.MyApp.WebsiteCore\node_modules\node-sass\lib\index.js:14:35)
at Module._compile (module.js:397:26)
at Object.Module._extensions..js (module.js:404:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (C:\DATA\Git\MyApp\MyBiz.MyApp\MyBiz.MyApp.WebsiteCore\node_modules\gulp-sass\index.js:187:21)
at Module._compile (module.js:397:26)
运行 gulp 运行任务,我的 SASS 编译正常。
我尝试重新安装节点,我还确保只有一个npm runnable 在 Windows 路径中,我删除了node_modules 文件夹并运行了几次npm install,还尝试了npm rebuild node-sass。
所有这些数以百万计的很酷的新前端工具和库似乎极大地拓宽了“出错的地方”的范围,与以前的项目相比,效率并不高。
卢克
【问题讨论】:
-
惭愧地说我放弃并回到 ASP.NET MVC 5 :-/
标签: node.js visual-studio-2015 npm sass gulp