在 VS2015 的开发人员命令提示符中,'npm' 未被识别为内部或外部命令错误

s.k*_*aul 5 npm visual-studio-2015

我正在尝试npm install –g tsd在 VS2015 的开发人员命令提示符中执行。

但它返回

'npm' 不是内部或外部命令,也不是可运行的程序或批处理文件。

任何的想法?

sil*_*ire 6

To solve this issue in Visual Studio 2017, make sure to install the NodeJS tools in the VS installer.

To launch it, go to Control Panel -> Programs -> Programs and Features, scroll down to Visual Studio 2017 and click Change.

Choose Modify in the installer.

选中Node.js development复选框并单击Modify完成安装。

在此处输入图片说明


All*_*der 2

下载/安装 Visual Studio 的 NodeJS 工具;这将解决问题并为您带来智能感知以及其他好处!

https://github.com/Microsoft/nodejstools