'cordova'不被识别为内部或外部命令 [英] 'cordova' is not recognized as an internal or external command

查看:621
本文介绍了'cordova'不被识别为内部或外部命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用node.js(命令行界面)安装cordova 5.1.1版本.

I am trying to install cordova 5.1.1 version using node.js, Command line interface.

cordova已安装在计算机上,但是我无法使用cordova命令.当我列出软件包时,我可以看到已安装的cordova cordova,但无法运行命令来创建项目.

cordova got installed on the machine, but I am not able to use cordova command. When I list the packages, I can able to see installed cordova cordova, but can not run command to create project.

系统配置:操作系统:Windows 8,npm版本:1.3.21,科尔多瓦版本:5.1.

System config : OS : windows 8, npm version : 1.3.21, Cordova version : 5.1.

错误消息

C:>科尔多瓦

"cordova"未被识别为内部或外部命令,可操作程序或批处理文件.

'cordova' is not recognized as an internal or external command, operable program or batch file.

推荐答案

需要设置环境变量.

开始->控制面板->系统和安全->系统->环境变量

Start -> Control Panel -> System and Security -> System -> Environment variables

我的电脑->右键单击->属性->高级系统设置->环境变量

Mycomputer -> Right Click -> properties -> Advance System settings -> Environment variables

您的用户的用户变量下:

under User variables for youruser:

路径: %SystemRoot%\ system32;%SystemRoot%;%SystemRoot%\ System32 \ Wbem;%SYSTEMROOT% \ System32 \ WindowsPowerShell \ v1.0 \; C:\ Users \ user1 \ AppData \ Roaming \ npm`

Path: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT% \System32\WindowsPowerShell\v1.0\;C:\Users\user1\AppData\Roaming\npm`

温度: %USERPROFILE%\ AppData \ Local \ Temp 简单的复制粘贴将无法工作.

Temp: %USERPROFILE%\AppData\Local\Temp Simple copy pasting wont work.

如果仍然不需要重置/创建DWORD

If Still Not getting need reset/create the DWORD

1.单击开始"菜单,然后在搜索框中键入"regedit".这将启动Windows注册表编辑器程序.

1.Click the Start menu and type "regedit" on the search box. This will launch the Windows Registry Editor program.

2.输入以下注册表项:HKEY_CURRENT_USER \ Software \ Microsoft \ Windows Script Host \ Settings

2.Enter to the following Registry entry: HKEY_CURRENT_USER\Software\Microsoft\Windows Script Host\Settings

3.在右侧窗口中选择启用"条目.如果存在该条目,请右键单击并选择新建",然后选择"DWORD值".将值命名为"Enabled".

3.Select the "Enabled" entry in the right side window. If this entry is there, right-click and select "New" followed by "DWORD Value." Name the value "Enabled."

4.右键单击启用"条目,然后单击修改".

4.Right-click the "Enabled" entry and click "Modify."

5.将值"框中的数字更改为"1".这将重新启用WSH.

5.Change the number in the "Value" box to "1." This will re-enable WSH.

6.关闭所有打开的cmd窗口并打开一个新窗口.

6.close all opened cmd windows and open a new window.

这篇关于'cordova'不被识别为内部或外部命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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