Ubuntu Linux:Netbeans无法检测到Git或Cordova安装 [英] Ubuntu Linux: Netbeans cannot detect Git or Cordova installed

查看:169
本文介绍了Ubuntu Linux:Netbeans无法检测到Git或Cordova安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

按照指南,我安装了所有需要的软件包,显然所有工作都很好

Following guide, I installed every needed package and they're apparently all working fine

$ echo $PATH
/usr/local/lib/node_modules/cordova/bin:/home/maxxer/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
$ node -v
v0.10.33
$ cordova --version
hello: 
4.1.2
$ git --version
git version 2.1.0

$ which node
/usr/bin/node
$ which cordova
/usr/local/lib/node_modules/cordova/bin/cordova
$ which git
/usr/bin/git

新的HTML5 Cordova应用程序NB说我缺少git或cordova安装...我发现NB bugzilla的几个错误,但没有一个在这里适用。

Yet when I try creating a new HTML5 Cordova app NB says I'm missing git or cordova installation... I found several bugs on NB bugzilla, but none of them apply here.

忘记说我在amd64上使用NetBeans 8.0.1。

Forgot to say I'm using NetBeans 8.0.1 on amd64.

推荐答案

感谢@ladar帮助我,我发现罪魁祸首确实是由任何 cordova 命令(例如 cordova --version )打印的 hello: cordova --help )。我不知道为什么这最初存在,因为我安装cordova使用 npm install -g cordova ,甚至运行更新输出总是相同的。

Thanks to @ladar for helping me out I found out that the culprit was indeed that hello: printed by any cordova command (like cordova --version or cordova --help). I don't know why this originally existed, since I installed cordova using npm install -g cordova, and even running update the output was always the same.

所以我用

which cordova

和第20行附近:

// Set this to 1 to enable timestamp collection via addTs().
console.log('hello: ');
if (0) {
    var ts = [];

添加 // code> console.log 最终使Netbeans工作!

Adding // in front of the console.log finally made Netbeans work!

再次感谢@ladar的建议

Thanks again @ladar for your suggestions

这篇关于Ubuntu Linux:Netbeans无法检测到Git或Cordova安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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