Visual Studio 2013/2015 - 节点包构建错误(gulp_util) [英] Visual Studio 2013/2015 - node package build error (gulp_util)

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

问题描述

一点背景:

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



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

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



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


错误13命令C:\ TFS\Branding\packages\\ \\Gulp.js.1.0.2\build..\tools\\\
pm.cmdinstall gulp gulp-util --save-dev退出代码1. Branding




我无法确定为什么会出现这种情况,或者为什么只发生在某些团队中。我们正在使用VS2013和2015的混合版本,但是错误也可能发生。

我可以看到有问题的命令确实存在于该位置 - 受影响的环境,如果我运行:

  npm install gulp gulp-util --save-dev 

- 它安装时没有错误,但VS项目仍然产生错误。



我被困住了,任何关于要看什么的想法都将不胜感激。

您的位置C:\ TFS \Branding\packages\Gulp.js.1.0.2\build..\tools\\\
pm.cmd告诉我这是与nuget安装的(因为包文件夹)。你不应该使用nuget,如果你只做客户端开发,使用npm和bower - 特别是现在在VS 2013和2015中有很好的支持。


A little background:

My team has a web branding project in Visual Studio, just static HTML, CSS and a little javascript - no .NET classes or anything.

We added node, npm, gulp and some gulp task packages to take care of some bundling and minification.

The gulp tasks run fine via the Task Runner Explorer, no issues.

However, some of our team are getting an error when attempting to build the project (in order to view the static pages in browsers through IIS):

Error 13 The command ""C:\TFS\Branding\packages\Gulp.js.1.0.2\build..\tools\npm.cmd" install gulp gulp-util --save-dev" exited with code 1. Branding

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)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆