Cordova cli create with proxy

随声附和 提交于 2020-01-15 18:46:03

问题


I want to run

cordova create hello com.example.hello HelloWorld

but all I get is the base folder structure and the error: connect ETimedOut.

I have set the proxy for node.js and PhoneGap projects get setup fine. Cordova cli is setup fine so far (can find it in c:\Users\username\AppData\Roaming\npm)

Anything I am missing? (PATH is set to ...npm)


回答1:


I managed to fix it:

  • set the urls platform.js

    http instead of https.
    
  • installed ANT and set some environement vars:

    ANT_HOME c:\dev\apache-ant-1.9.3\
    ANT_OPTS -Dhttp.proxyHost=http://proxy.myAddress.de -Dhttp.proxyPort=3000
    PATH %ANT_HOME%\bin
    
  • set some additonal Adnroid environment vars:

    PATH %ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools
    

Hope this helps others



来源:https://stackoverflow.com/questions/21166539/cordova-cli-create-with-proxy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!