在 Visual Studio 2017 中更新节点版本 [英] Update Node Version in Visual Studio 2017
问题描述
有人知道在 Visual Studio 2017 中更新 Node 的认可方式吗?我在开发 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.0WebExternal
找到了 VS Node 安装,但我有点不愿意随便修改和替换它.有人有升级这个的经验吗?我知道我可以通过降级 PC 上的版本来同步,但这似乎是倒退的.
I found the VS Node install at C:Program Files (x86)Microsoft Visual Studio 14.0WebExternal
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屋!