【问题标题】:Node.js azure installationNode.js 天蓝色安装
【发布时间】:2014-02-19 21:46:02
【问题描述】:

我已经在 azure 云中创建了虚拟机。然后我用 msi 安装 64 位 nodejs。 我正在尝试在 powershell 中运行节点 js。我收到以下错误。

我该如何解决这个问题?

PS C:\Program Files\nodejs>
PS C:\Program Files\nodejs> node
node : The term 'node' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ node
+ ~~~~
    + CategoryInfo          : ObjectNotFound: (node:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

【问题讨论】:

  • 你的 PATH 变量中是否设置了 Node.js 文件夹?
  • 我在azure服务器中没有找到我的电脑图标或开始按钮,所以我没有设置PATH。
  • 我假设您使用的是 Windows Server 2012。您将在控制面板中找到所有内容。如果您想使用 shell,请关注 @Zugwalt 的帖子。

标签: node.js azure


【解决方案1】:

默认情况下,节点可能未设置在您的执行路径中。试试adding it to your path

set PATH=%PATH%;C:\Program Files\nodejs

然后运行它:

node

如果可行,请继续使用 setx 将其永久添加到您的路径中。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-07-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-09-09
    • 1970-01-01
    相关资源
    最近更新 更多