Fails to run Gruntfile.js in Visual Studio 2015 Update 2

♀尐吖头ヾ 提交于 2019-12-25 09:40:42

问题


After upgrading to Visual Studio 2015 Update 2 I am unable to load my gruntfile.js. When I open "Task Runner Explorer" and try to refresh the gruntfile.js it writes the following in my output window:

Failed to run "(PATH)\Gruntfile.js"... cmd.exe /c grunt -b "(PATH)" --gruntfile "(PATH)\Gruntfile.js" --tasks "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\TaskRunnerExplorer\Scripts" vs-grunt-task-reader

Any ideas?


回答1:


It looks like you deleted/moved/lost your nodejs packages, so they'll need reinstalling.

Run npm install from the command line in the folder that contains package.json.




回答2:


I had a syntax error in the gruntfile.js but how was I suppose to know grunt did not tell me anything. I restored the grunt file and it worked.



来源:https://stackoverflow.com/questions/36752647/fails-to-run-gruntfile-js-in-visual-studio-2015-update-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!