Ionic 2 serve error

125 Views Asked by At

I got the following errors after ionic serve --lab:

enter image description here Any Idea why the error above is occurred?

Ionic cli version 3.9.0

App scripts version 1.4.1

Typescript 2.3.9

Thanks.

3

There are 3 best solutions below

2
pnine On

Stylesheets don't get applied and javascript is not executed, because your browser reports wrong MIME types for these requested documents. They're all sent as text/html.

It seems to be the same problem, as reported here.

You may try to go to any of the .ts files like user.ts or app.ts and save them again. This will trigger the automatic build, once finished, your app should run fine again.

0
Georg Kastenhofer On

After some investigations I found very similar problems.

Could you try the following:

Add <base href="/"> in head before linking all css files

enter image description here

https://github.com/froala/angular-froala/issues/170#issuecomment-386117678

https://github.com/angular/angular-cli/issues/10325#issuecomment-399329033

0
Steve On

I faced the same issue many times.when i close the console and run it again as ionic serve it worked for me properly.Try this once.