【发布时间】:2014-11-26 11:48:20
【问题描述】:
虽然我遵循以下建议:
- 'node' is not recognized as an internal or an external command, operable program or batch file while using phonegap/cordova
- Node.js doesn't recognize system path?
- ‘ant’ is not recognized as an internal or external command...
我遇到了一个奇怪的问题:继续,虽然节点路径是路径中的列表,但它没有找到节点。
工作流程:
Microsoft Windows [Version 6.3.9600] //Running CMD on windows 8.1
(c) 2013 Microsoft Corporation. All rights reserved.
我按照 SO 中的建议,将变量添加到环境变量中,并在路径中显示 Ok:
C:\Users\myUser>path
PATH=c:\Program Files (x86)\nodejs ; (...omitted...) //So folder is there
下一行将失败
C:\Users\myUser>call jasmine-node spec
'node' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\myUser>cd "c:\Program Files (x86)\nodejs" //So I move to the folder list before...
但是如果我移动到路径中的文件夹列表,那么它工作正常。
c:\Program Files (x86)\nodejs>call jasmine-node spec
> (...omitted...) //Exec OK.
c:\Program Files (x86)\nodejs>node
> //Exec OK. Waiting...
这似乎是矛盾的。
【问题讨论】:
-
PATH中的分号前是否真的有空格,或者您在编辑时添加了空格? -
O_O 霍布斯!!就是这样!我手动编辑添加空格!非常感谢!我花了几个小时试图找到问题!如果您将其添加为答案,我会接受。
-
这发生在我身上刚刚我安装了一个不同的、不相关的程序。导致此问题“突然”出现的可能与 Node 无关。就我而言,Dropbox 改变了我的 PATH。
标签: node.js