在Visual Studio 2017中更新节点版本 [英] Update Node Version in Visual Studio 2017

查看:94
本文介绍了在Visual Studio 2017中更新节点版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道在Visual Studio 2017中更新节点的认可方法吗?我已经在开发PC上设置了Node 6,但是VS2017似乎附带了Node 5的捆绑副本,这意味着在命令行上运行npm install会设置诸如node-sass的各种程序包,并带有对Node 6的绑定.因此,当我随后从VS Task Runner运行gulp任务时,由于版本不匹配,一切都会掉下来.

Does anyone know of a sanctioned way to update Node within Visual Studio 2017? I've got Node 6 set up on my development PC but VS2017 appears to come with a bundled copy of Node 5, which means that running npm install on my command line sets up various packages like node-sass with bindings for Node 6, so when I then run gulp tasks from the VS Task Runner things fall over due to the mismatched versions.

我发现在C:\Program Files (x86)\Microsoft Visual Studio 14.0\Web\External处安装了VS Node,但我有点不情愿只是破解并替换它.任何人都有升级的经验吗?我知道可以通过降级PC上的版本进行同步,但这似乎是倒退.

I found the VS Node install at C:\Program Files (x86)\Microsoft Visual Studio 14.0\Web\External but I'm a little reluctant to just hack about and replace it. Anyone got any experience of upgrading this? I know I can sync by downgrading the version on my PC but that seems backwards.

推荐答案

转到:

工具>选项>项目和解决方案> Web软件包管理>外部Web工具

Tools > Options > Projects and Solutions > Web Package Management > External Web Tools

然后,您需要将Node安装目录添加到列表的顶部,如下所示:

Then you need to add your Node install directory to the top of the list, like so:

这篇关于在Visual Studio 2017中更新节点版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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