使用VS2017安装中的Node或NPM [英] Using Node or NPM from VS2017 installation

查看:849
本文介绍了使用VS2017安装中的Node或NPM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有NPM节点和VS2017安装的各种其他模块, 但我没有在命令shell中使用它们。

I have Node with NPM and various other modules installed with VS2017,  but I don't have them available in a command shell.

只是想知道是否最好将VS2017安装位置添加到路径并使用它们,或者我应该安装新版本的节点等在其他地方?  (主要用于运行需要NPM的一些教程)。

Just wondering if it is best to add the VS2017 install locations to path and use them, or should I install a fresh version of Node etc elsewhere?  (Mainly for running thru some tutorials that require NPM).

是否有设置在命令shell中使用这些工具的设置,或者有关添加到路径或其他环境变量的内容的说明?

Are there settings someplace for using these tools in a command shell, or instructions on what to add to path or other env vars?

推荐答案

欢迎来到MSDN论坛。

Welcome to MSDN forum.

> ;>我有NPM节点和VS2017安装的各种其他模块, 但我没有在命令shell中使用它们。

在Visual Studio 2017中安装Node.js开发工作量不是足够的,您需要使用节点版本管理器或节点安装程序安装Node.js和npm命令行界面
。在此之后,您可以在命令行中使用它。

Install Node.js development workload in visual studio 2017 is not enough, you need to install Node.js and the npm command line interface using either a Node version manager or a Node installer. After this, you can use it in command line.

https://docs.npmjs.com/downloading-and-installing-node-js-and-npm

Visual Studio可以轻松地与npm交互并通过UI或直接发出npm命令。

Visual Studio makes it easy to interact with npm and issue npm commands through the UI or directly.

https://docs.microsoft.com/ en-us / visualstudio / javascript / npm-package-management?view = vs-2017

如果你想要从命令行使用NPM为visual studio解决方案安装软件包,以避免手动导航到正确的目录,使用"打开命令行"。 Mads Kristensen的延伸。它在市场上免费提供
。你会发现它这里

If you want to install package using the NPM for visual studio solutions from command line, to avoid navigating manually to the correct directory use the "Open Command Line" extension from Mads Kristensen. It is available for free in the Marketplace. You find it here.

https:// stackoverflow .com / questions / 49208056 / how-to-use-npm-and-install-packages-inside-visual-studio-2017

祝你好运,

Joyce





这篇关于使用VS2017安装中的Node或NPM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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