2017-01-20 5 views
0

私はcordovaをテストし、簡単なテストアプリケーションを構築したいと思います。 私はここでhttps://cordova.apache.org/#getstartedCordovaのブラウザエラー

からのステップは、いくつかの出力(前回の出力からエラーなし)です続い:

C:\Users\jnq\Desktop\testCordova\TestLights>cordova platform add browser 
Adding browser project... 
Running command: cmd "/s /c "C:\Users\jnq\.cordova\lib\npm_cache\cordova-browser\4.1.0\package\bin\create.bat 
C:\Users\jnq\Desktop\testCordova\TestLights\platforms\browser  io.cordova.hellocordova HelloCordova"" 
Creating Browser project. Path: platforms\browser 
Error loading cordova-browser 
Installing "cordova-plugin-whitelist" for browser 

C:\Users\jnq\Desktop\testCordova\TestLights>cordova run browser 
Error loading cordova-browser 
Running command: cmd "/s /c "C:\Users\jnq\Desktop\testCordova\TestLights\platforms\browser\cordova\build.bat"" 
Cleaning Browser project 
Running command: cmd "/s /c "C:\Users\jnq\Desktop\testCordova\TestLights\platforms\browser\cordova\run.bat --nobuild"" 
Static file server running @ http://localhost:8000/index.html 
CTRL + C to shut down 

私はエラーとChromeブラウザの開放で終わる:ERR_CONNECTION_RESET

はなかったです私は何かをスキップした? コードバにブラウザプラットフォームを使用するにはどうすればよいですか?

ありがとう、 JNQ。

編集:ここでは詳細なオプションを指定してコマンドを追加します:

No scripts found for hook "before_platform_add". 
No version supplied. Retrieving version from config.xml... 
Adding browser project... 
Failed to require PlatformApi instance for platform "browser". Using polyfill instead. 
Running command: cmd "/s /c "C:\Users\jnq\.cordova\lib\npm_cache\cordova-browser\4.1.0\package\bin\create.bat C:\Users\jnq\Desktop\testCordova\TestLights\platforms\browser io.cordova.hellocordova HelloCordova"" 
Creating Browser project. Path: platforms\browser 
Command finished with error code 0: cmd /s /c "C:\Users\jnq\.cordova\lib\npm_cache\cordova-browser\4.1.0\package\bin\create.bat C:\Users\jnq\Desktop\testCordova\TestLights\platforms\browser io.cordova.hellocordova HelloCordova" 
Error loading cordova-browser 
Checking for any plugins added to the project that have not been installed in browser platform 
No differences found between plugins added to project and installed in browser platform. Continuing... 
Generating config.xml from defaults for platform "browser" 
Installing plugin "cordova-plugin-whitelist" following successful platform add of browser 
Found variables for "cordova-plugin-whitelist". Processing as cli_variables. 
Installing "cordova-plugin-whitelist" for browser 
Running command: cmd "/s /c "C:\Users\jnq\Desktop\testCordova\TestLights\platforms\browser\cordova\version.bat"" 
Command finished with error code 0: cmd /s /c "C:\Users\jnq\Desktop\testCordova\TestLights\platforms\browser\cordova\version.bat" 
Finding scripts for "before_plugin_install" hook from plugin cordova-plugin-whitelist on browser platform only. 
No scripts found for hook "before_plugin_install". 
Install start for "cordova-plugin-whitelist" on browser. 
Beginning processing of action stack for browser project... 
Action stack processing complete. 
Install complete for cordova-plugin-whitelist on browser. 
Finding scripts for "after_plugin_install" hook from plugin cordova-plugin-whitelist on browser platform only. 
No scripts found for hook "after_plugin_install". 
No scripts found for hook "before_prepare". 
Checking config.xml for saved platforms that haven't been added to the project 
Checking for any plugins added to the project that have not been installed in browser platform 
No differences found between plugins added to project and installed in browser platform. Continuing... 
Generating config.xml from defaults for platform "browser" 
No scripts found for hook "after_prepare". 
Checking config.xml for saved plugins that haven't been added to the project 
Saving [email protected] into platforms.json 
No scripts found for hook "after_platform_add". 

して実行コマンドの1:

C:\Users\jnq\Desktop\testCordova\TestLights>cordova run browser --verbose 
No scripts found for hook "before_run". 
No scripts found for hook "before_prepare". 
Checking config.xml for saved platforms that haven't been added to the project 
Error loading cordova-browser 
Checking for any plugins added to the project that have not been installed in browser platform 
No differences found between plugins added to project and installed in browser platform. Continuing... 
Generating config.xml from defaults for platform "browser" 
No scripts found for hook "after_prepare". 
Checking config.xml for saved plugins that haven't been added to the project 
Running command: cmd "/s /c "C:\Users\jnq\Desktop\testCordova\TestLights\platforms\browser\cordova\build.bat"" 
Cleaning Browser project 
Command finished with error code 0: cmd /s /c "C:\Users\jnq\Desktop\testCordova\TestLights\platforms\browser\cordova\build.bat" 
No scripts found for hook "before_deploy". 
Running command: cmd "/s /c "C:\Users\jnq\Desktop\testCordova\TestLights\platforms\browser\cordova\run.bat --nobuild"" 
Static file server running @ http://localhost:8000/index.html 
CTRL + C to shut down 

EDIT2:どうやら私はそれがその後、別のポートを使用して実行するために取得することができます8000.

+0

追加プロセスでエラーメッセージが表示される場合は、 'cordova platform add browser --verbose'を実行してみてください。 –

+0

実際に出力に関する問題はありません:( – JNQ

+0

これはブロックされたポートに関するものですか?良いですが、コルドバを学ぶことを祈っています:) Ionicも試してみてください。 –

答えて

0

cordovaでブラウザプラットフォームを使用しているときに接続に関するエラーが発生した場合は、別のポートを使用してみてください: cordova run browser - --port = 8080

関連する問題