Cannot serve app in localhost with ionic serve (blank page)

hi guys i was working on a app for 2 months, its never been before. today i typed ionic serve and it gave me a blank page. i tried again again again; nothing changed.

the errors of console is like that:

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

then i searched for solution on the internet and tried that:

npm uninstall -g cordova ionic
npm install -g cordova ionic

but it didnt work!

so i remembered, once i backed up my app folder before. so i tried that and saw it works. i copied that back-up folder’s www/build folder files to the my up to date app-folder. and run ionic serve again. it deletes all files automatically and doesnt work?

i cannot serve my app ? please assist me guys. i did nothing to receive that error i am shocked!

terminal:

Starting app-scripts server: --address 0.0.0.0 --port 8100 --livereload-port 35729 --dev-logger-port 53703 --nobrowser -
Ctrl+C to cancel
[04:35:39]  watch started ...
[04:35:39]  build dev started ...
[04:35:39]  clean started ...
[04:35:39]  clean finished in 7 ms
[04:35:39]  copy started ...
[04:35:39]  deeplinks started ...
[04:35:39]  deeplinks finished in 236 ms
[04:35:39]  transpile started ...
[04:35:43]  dev server running: http://localhost:8100/

[OK] Development server running!
     Local: http://localhost:8100
     External: http://192.168.1.3:8100, http://192.168.136.1:8100, http://192.168.80.1:8100
     DevApp: DenemeApp@8100 on ASUS

[04:35:44]  copy finished in 4.77 s
[04:35:44]  watch ready in 4.94 s

stops here.

my ionic info:


cli packages: (C:\Users\Uğur\AppData\Roaming\npm\node_modules)

    @ionic/cli-utils  : 1.19.0
    ionic (Ionic CLI) : 3.19.0

global packages:

    cordova (Cordova CLI) : 7.1.0

local packages:

    @ionic/app-scripts : 3.0.1
    Cordova Platforms  : none
    Ionic Framework    : ionic-angular 3.8.0

System:

    Node : v6.11.4
    npm  : 3.10.10
    OS   : Windows 8.1

Environment Variables:

    ANDROID_HOME : not set

Misc:

    backend : pro

Hi, have you tried to clean the cookie/ cache of your browser?

yes i tried that, also i tried in different browsers its not about cache or cookie. main.js vendor.js main.css files are corrupted or something. and i dont know why this happened and how to fix this.

Try ‘npm install’ in the project folder

tried didnt work mate

you might want to re-install your node. Perhaps it’s because of the update?

tried re-install node to current LTS (8.9.3). Didnt work.
Anybody have luck?

Ok I “fix” it by revert from repository to last revision and it worked! Then I implemented same functionality and it still worked (maybe little bit different way).
Maybe it could be something with typescript because it not compiled all TS code. Some syntax error that’s not be highlight right because when I run Ionic build, it show me internal typescript error without link to my code.

Hello. I was about to go mad with this error. The app was serving a blank page. Eventually I sorted it it because I had the CDN of Ionic in the app.component.html file

I had put there the CDN long ago and I had forgotten in there and it started to cause this error after a while. It was super weird as it happened from one day to the other. I just commented the line about the CDN

<!-- CDN Ionic -->

  <!-- <script type="module" src="https://cdn.jsdelivr.net/npm/@ionic/core/dist/ionic/ionic.esm.js"></script>

  <script nomodule src="https://cdn.jsdelivr.net/npm/@ionic/core/dist/ionic/ionic.js"></script>  -->

  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ionic/core/css/ionic.bundle.css"/>