when i build cordova project it working fine. output also shown.But, after few minutes later it shows this error
Error: Failed to fetch platform cordova-browser@~5.0.0
PS C:\Users\Rajadurai\Desktop\app> phonegap serve
[phonegap] starting app server...
[phonegap] listening on 127.0.0.1:3000
[phonegap]
[phonegap] ctrl-c to stop the server
[phonegap]
[phonegap] 200 /socket.io/?EIO=3&transport=polling&t=M6UXY64
[phonegap] 200 /socket.io/?EIO=3&transport=polling&t=M6UXY79&sid=rXL4l2-OqPKmfZW6AAAA
[phonegap] 200 /socket.io/?EIO=3&transport=polling&t=M6UXY7l&sid=rXL4l2-OqPKmfZW6AAAA
[phonegap] 200 /
[phonegap] 304 /socket.io/socket.io.js
[phonegap] 200 /socket.io/?EIO=3&transport=polling&t=M6UXYG2
[phonegap] 200 /socket.io/?EIO=3&transport=polling&t=M6UXYJ5&sid=zpW7GDvt1Qd-4P4fAAAB
[phonegap] 200 /socket.io/?EIO=3&transport=polling&t=M6UXYJg&sid=zpW7GDvt1Qd-4P4fAAAB
[phonegap] 200 /
[phonegap] 304 /socket.io/socket.io.js
[phonegap] 200 /
[phonegap] 200 /socket.io/?EIO=3&transport=polling&t=M6UXg9G
[phonegap] 200 /socket.io/?EIO=3&transport=polling&t=M6UXg9j&sid=c-F51GuDrgqwHErsAAAC
[phonegap] 200 /socket.io/?EIO=3&transport=polling&t=M6UXgA9&sid=c-F51GuDrgqwHErsAAAC
Using cordova-fetch for cordova-browser@~5.0.0
Error: Failed to fetch platform cordova-browser@~5.0.0
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: cmd: Command failed with exit code 1 Error output:
npm ERR! code ENOENT
npm ERR! errno ENOENT
npm ERR! enoent request to https://registry.npmjs.org/cordova-browser failed, reason: getaddrinfo ENOENT registry.npmjs.org:443
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Rajadurai\AppData\Roaming\npm-cache\_logs\2018-02-16T12_12_00_250Z-debug.log
Screenshot
Please help me to reslove this issue
Remove the platform which you try to run on it (browser, ios, android, and etc.)
For example (run cmd, locate to your project folder and type):
cordova platform rm browser
Add the platform again
cordova platform add browser
You can run
cordova run browser
CordovaError: Failed to fetch platform cordova-android@^8.0.0/ cordova – Error: Failed to fetch platform android
If you face any of the above error, please perform following step to solve this
1) Please add C:\Windows\System32 in envrionment variable paths
2) ensure JDK/bin path is setup under JAVA_HOME and path
3) ensure sdk path is setup under ANDROID_HOME and path
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With