Failed to load resource: the server responded with a status of 404 (Not Found) ripple.js

蓝咒 提交于 2019-12-01 03:06:03

问题


Hello my problem is to develop phonegap application in HTML5 with the Visual Studio tools for apache cordova https://www.visualstudio.com/en-us/features/cordova-vs.aspx the error write when I debug application is

Ripple :: Environment Warming Up (Tea. Earl Gray. Hot.) ripple.js (37,13099)

Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.> ripple.js (50,28958)

Failed to load resource: the server responded with a status of 404 (Not Found) ripple.js

thank you for the help


回答1:


May be part of the answer: For the second error (not found 404), what worked for me is to copy config.xml to the root path (where your source code is).

For the first error (synchronous XMLHttpRequest, which is not important for the emulating process, but you may want to see a "clear" console log) just edit ripple.js

[MAIN_DRIVE]:\Users\[YOUR_USER]\AppData\Roaming\npm\node_modules\ripple-emulator\pkg\hosted

In the line that the emulator complains about, look for the xhr request. Change

xmlHttp.open("GET", utils.appLocation() + fileName, false);

to

xmlHttp.open("GET", utils.appLocation() + fileName, true);

and you are done, Hope this helps. These errors are not related by the way.




回答2:


This solution worked for me in the two cases. Seems to be OK.

By the way: 'the root path (where your source code is)' : the www folder of the project in VS2015

And the ripple.js file found in: always for VS2015 as Bjoerg.




回答3:


I was getting a similar error because my npm version was at 3.3.6 which apparantly has some kind of bug in it. Updating node and npm fixed it for me:

npm install npm@3.3.7 -g

I've updated node by simply downloading and installing the latest version from nodejs.org.



来源:https://stackoverflow.com/questions/30262807/failed-to-load-resource-the-server-responded-with-a-status-of-404-not-found-r

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