节点已安装,但节点和 NPM 均无法通过命令行使用

Node Installed, But Neither Neither Node nor NPM Available Via Command Line

我正在使用带有 Windows 10 OS 的笔记本电脑。

我正在通过 PHP/MySQL/JQuery 在本地构建网页(使用 XAMPP 的 PHP 5.6 版本)。

我试图在我的命令行(windows 命令提示符)中使用 npm 但出现以下错误:'npm' 未被识别为内部或外部命令。

这是我所做的: 1. 转到以下 URL 安装 node.js(应该与 npm 捆绑在一起):https://nodejs.org/en/

  1. 下载 msi 安装程序

  2. 运行 通过安装程序。

如果我启动 node.js 并尝试通过模式安装包(即 npm install gulp),它将 return 消息 "npm should be run outside of the node repl, in your normal shell".

但是,如果我打开命令行并输入 "node -v",似乎也没有安装 Node。

感叹

一如既往,尽管实际上事先进行了搜索,但我在发布后几乎立即找到了答案。

在此处找到解决方案:How to resolve 'npm should be run outside of the node repl, in your normal shell'

Do not run the application using node.js icon.
Go to All Programmes->Node.js->Node.js command prompt.