Question

I'm trying to create a project with Phonegap Latest (3.4). I've installed Node.js and I've installed phonegap using

npm install -g phonegap

but when I say

phonegap create my-project 

I receive the following output

Image

Any idea what could be causing this?

Était-ce utile?

La solution

phonegap needs all its paths correctly specified for all the dependent sdks and platforms

Add to your path some think like this

Variable Name: JAVA_HOME
Variable Value: C:\Program Files\Java\jdk1.7.0_45;

Variable Name: PATH
Variable Value: %JAVA_HOME%\bin;

Variable Name: PATH
Variable Value: C:\Documents and Settings\Your Name\Application Data\npm;

Variable Name: PATH
Variable Value: C:\Your Installation Path\To Node JS\

Variable Name: ANT_HOME
Variable Value: C:\Your Path\To Ant\apache-ant-1.9.3;

Variable Name: PATH
Variable Value: %ANT_HOME%\bin;

Variable Name: ANDROID_SDK_HOME
Variable Value: C:\Location To\Your Work\Environment\adt-bundle-windows-x86-20131030\sdk;

Variable Name: PATH
Variable Value: C:\Location To\Your Work\Environment\adt-bundle-windows-x86-20131030\sdk\platform-tools;

Variable Name: PATH
Variable Value: C:\Location To\Your Work\Environment\adt-bundle-windows-x86-20131030\sdk\tools;

I hope it helps :)

Autres conseils

It's possible that the wrong node.exe is being called. Check your PATH variable to see if it includes **C:\Program Files\Microsoft HPC Pack 2008 R2\Bin**. If so, there's a conflicting node.exe in that folder. One solution is to move your nodejs path prior to the Microsoft HPC path in the PATH string.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top