# Loading failed after ionic serve

**URL:** <https://forum.ionicframework.com/t/loading-failed-after-ionic-serve/103703>\
**Category:** ionic-v3\
**Created:** [August 30, 2017, 10:09am UTC](https://forum.ionicframework.com/t/loading-failed-after-ionic-serve/103703 "2017-08-30T10:09:06Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdline](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@mdline](https://forum.ionicframework.com/u/mdline)\
**Post date:** [August 30, 2017, 10:09am UTC](https://forum.ionicframework.com/t/loading-failed-after-ionic-serve/103703/1 "2017-08-30T10:09:06Z")

</div>

Hello,

I got the error “loading failed for scipt [http://localhost:8100/build/main.js](http://localhost:8100/build/main.js)” in browser after run command ionic serve.  
When I click on the error it jumps to index.html to  
`<script src="build/main.js"></script>.`

When I run the command ionic build I get the error Could not resolve ‘./polyfills.ts’ from src\app\main.ts.

Please help.

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [August 30, 2017, 10:38am UTC](https://forum.ionicframework.com/t/loading-failed-after-ionic-serve/103703/2 "2017-08-30T10:38:52Z")

</div>

What is your `ionic info` output?  
Did you app work before?  
Does it work with a new blank app created with `ionic start blank blank`?

---

<div class="post-metadata">

**Author:** ![mdline](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@mdline](https://forum.ionicframework.com/u/mdline)\
**Post date:** [August 30, 2017, 11:21am UTC](https://forum.ionicframework.com/t/loading-failed-after-ionic-serve/103703/3 "2017-08-30T11:21:24Z")

</div>

cli packages

```
@ionic/cli-utils : 1.9.2
ionic (Ionic CLI) : 3.9.2

```

local packages:

```
@ionic/app-scripts : 2.1.4
Ionic Framework : ionic-angular 3.6.0

```

System:

```
Node : v6.10.1
npm : 4.2.0
OS : Windows 7

```

The app works before my update, I updated the ionic and angular versions.

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [August 30, 2017, 11:27am UTC](https://forum.ionicframework.com/t/loading-failed-after-ionic-serve/103703/4 "2017-08-30T11:27:46Z")

</div>

Show us your new `package.json` then please.  
Also run `ionic serve --verbose` and post the whole output.

---

<div class="post-metadata">

**Author:** ![mdline](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@mdline](https://forum.ionicframework.com/u/mdline)\
**Post date:** [August 30, 2017, 11:53am UTC](https://forum.ionicframework.com/t/loading-failed-after-ionic-serve/103703/5 "2017-08-30T11:53:36Z")

</div>

Output from ionic serve --verbose

```auto
C:\XXX>ionic serve --verbose
[DEBUG] CLI flags: { interactive: true, confirm: false }
[DEBUG] { cwd: 'C:\\XXX', local: false, binPath:
        'C:\\Users\\XXX\\AppData\\Roaming\\npm\\node_modules\\ionic\\bin\\ionic', libPath:
        'C:\\Users\\XXX\\AppData\\Roaming\\npm\\node_modules\\ionic\\dist\\index.js' }
[DEBUG] Daemon found (pid: 11000)
[INFO] Starting app-scripts server: --address 0.0.0.0 --port 8100 --livereload-port 35729 - Ctrl+C to cancel
[13:45:43] watch started ...
[13:45:43] build dev started ...
[13:45:43] clean started ...
[13:45:43] clean finished in less than 1 ms
[13:45:43] copy started ...
[13:45:43] transpile started ...
[13:45:46] transpile finished in 3.76 s
[13:45:46] preprocess started ...
[13:45:46] deeplinks started ...
[13:45:47] deeplinks finished in 78 ms
[13:45:47] preprocess finished in 94 ms
[13:45:47] rollup started ...
[13:45:47] copy finished in 3.99 s
[13:45:47] dev server running: http://localhost:8100/

[INFO] Development server running
       Local: http://localhost:8100
[13:45:47] watch ready in 4.24 s

```

package.json

```auto
{
  "name": "MyApp",
  "config": {
    "ionic_rollup": "src/config/rollup.config.js"
  },
  "scripts": {
    "build": "ionic-app-scripts build",
    "watch": "ionic-app-scripts watch",
    "serve:before": "watch",
    "emulate:before": "build",
    "deploy:before": "build",
    "build:before": "build",
    "run:before": "build"
  },
  "dependencies": {
    "@angular/common": "^4.3.6",
    "@angular/compiler": "^4.3.6",
    "@angular/compiler-cli": "^4.3.6",
    "@angular/core": "^4.3.6",
    "@angular/forms": "^4.3.6",
    "@angular/http": "^4.3.6",
    "@angular/platform-browser": "^4.3.6",
    "@angular/platform-browser-dynamic": "^4.3.6",
    "@angular/platform-server": "^4.3.6",
    "@ionic/storage": "^2.0.1",
    "@types/lodash": "^4.14.42",
    "angular2-cookie": "^1.2.5",
    "d3-ng2-service": "^1.5.2",
    "ionic-angular": "^3.6.0",
    "ionic-native": "^2.4.0",
    "ionicons": "^3.0.0",
    "lodash": "^4.17.2",
    "ng2-translate": "^5.0.0",
    "rxjs": "^5.0.0-beta.12",
    "zone.js": "^0.8.17"
  },
  "devDependencies": {
    "@ionic/app-scripts": "^2.1.4",
    "rollup-plugin-replace": "^1.1.1",
    "sw-toolbox": "^3.4.0",
    "typescript": "2.3.4"
  },
  "description": "To see deep in the sea",
  "cordovaPlugins": [
    "cordova-plugin-device",
    "cordova-plugin-console",
    "cordova-plugin-whitelist",
    "cordova-plugin-splashscreen",
    "cordova-plugin-statusbar",
    "ionic-plugin-keyboard"
  ],
  "cordovaPlatforms": []
}

```

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [August 30, 2017, 12:16pm UTC](https://forum.ionicframework.com/t/loading-failed-after-ionic-serve/103703/6 "2017-08-30T12:16:12Z")

</div>

Ionic doesn’t support Angular 4.3.x yet.

See here for the most recent supported versions of everything:

> <https://github.com/ionic-team/ionic2-app-base/blob/master/package.json>

You can also create a new project with `ionic start blank blank` and compare that to your project.

---

<div class="post-metadata">

**Author:** ![mdline](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@mdline](https://forum.ionicframework.com/u/mdline)\
**Post date:** [August 30, 2017, 12:39pm UTC](https://forum.ionicframework.com/t/loading-failed-after-ionic-serve/103703/7 "2017-08-30T12:39:27Z")

</div>

I adapt the versions.  
I still got the error  
The ressourcce “[http://localhost:8100/build/main.css](http://localhost:8100/build/main.css)” is blocked due to MIME-Typ-Conflict(X-Content-Type-Options: nosniff).  
The main.js, main.css is still not not created.
