本文介绍了Visual Studio 2013/2015 - 节点包构建错误(gulp_util)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一点背景:

我的团队在Visual Studio中有一个Web品牌项目,只是静态HTML,CSS和一个小小的JavaScript - 没有.NET类或任何类。



我们添加了node,npm,gulp和一些吞噬任务包,以照顾一些捆绑和缩小。

通过Task Runner Explorer可以正常运行,没有问题。



然而,我们的一些团队在尝试构建项目时遇到了错误(为了通过IIS查看浏览器中的静态页面):

I have not been able to determine why this is occuring or why it only happens for some of the team. We are using a mixture of VS2013 and 2015, but the error can occur on either.

I can see that the command in question does exist at the location - on one of the affected environments, if I run:

npm install gulp gulp-util --save-dev

from the command prompt in the project root - it installs without error, yet the VS project still produces the error.

I'm stumped, and any ideas on what to look into would be greatly appreciated.

解决方案

Your location "C:\TFS\Branding\packages\Gulp.js.1.0.2\build..\tools\npm.cmd" tells me that this is installed with nuget (because of the packages folder). You should not use nuget if you only do client side developing, use npm and bower instead - especially there is good support now in VS 2013 and 2015.

这篇关于Visual Studio 2013/2015 - 节点包构建错误(gulp_util)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 06:34