Failed to load resource: The requested URL was not found on this server in Ionic 2?
Asked Answered
T

1

6

I have a Ionic 2 application which was working fine in the chrome browser, but when it run on simulator (remote debugging with Safari) or actual device it gives below error. After this error app is not working properly entirely.

V2%20AppName.app/www/build/js/es6-shim.map. Failed to load resource: The requested URL was not found on this server

This is my index.html. I have another error stating about ngCordova like this above one. I think my ngCordova not taking its path properly. Any way to test whether its install properly or not.

<!DOCTYPE html>
<html dir="ltr" lang="en">

<head>
  <title>Ionic</title>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">

  <!--<meta http-equiv="Content-Security-Policy" content="img-src 'self' data:; default-src 'self' http://XX.XX.XX.XX:8084/mypp/">-->
  <!--<meta http-equiv="Content-Security-Policy" content="default-src *; script-src 'self' 'unsafe-inline' 'unsafe-eval' *; style-src  'self' 'unsafe-inline' *">-->
  <meta name="format-detection" content="telephone=no">
  <meta name="msapplication-tap-highlight" content="no">

  <link rel="stylesheet" href="build/css/font-awesome.min.css">
  <link ios-href="build/css/app.ios.css" rel="stylesheet">
  <link md-href="build/css/app.md.css" rel="stylesheet">

<script src="lib/ngCordova/dist/ng-cordova.js"></script>
</head>

<body>
  <ion-app></ion-app>
  <script src="cordova.js"></script>
  <script src="build/js/app.bundle.js"></script>
</body>
</html>
Traynor answered 2/3, 2016 at 8:28 Comment(1)
Did you resolve the issue? I am facing the same issue.Tuff
C
0

The problem could be due to the resource not being properly installed, in this case it looks like es6-shim. In the main terminal or console window at the root directory. Run npm install to reinstall the necessary resources which should fix the issue. Another issue could be missing dependencies.

I would compare the dependencies list in the package.json on your project to that of the ionic version that you're using to the one on the github repository since there have been breaking changes with the recent beta releases. Another option would doing a clean install and moving over your pages/ component to the new project folder.

Ionic Version 2.0 branch

Counterattraction answered 3/7, 2016 at 22:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.