Ionic Lab - Refused to apply style because its MIME type ('text/html') is not a supported

I don’t know what a hell is that…I was coding and suddenly I noticed that console.log was’t working anymore. So, I found this on the terminal window and I swear that I did’t touched on the index.html not webpack:

Error: Debug Failure.
at typeToString (/Users/me/Projects/myProject/node_modules/typescript/lib/typescript.js:28777:22)
at checkVariableLikeDeclaration (/Users/me/Projects/myProject/node_modules/typescript/lib/typescript.js:44893:219)
at checkPropertyDeclaration (/Users/me/Projects/myProject/node_modules/typescript/lib/typescript.js:43383:13)
at checkSourceElement (/Users/me/Projects/myProject/node_modules/typescript/lib/typescript.js:46700:28)
at Object.forEach (/Users/me/Projects/myProject/node_modules/typescript/lib/typescript.js:1506:30)
at checkClassDeclaration (/Users/me/Projects/myProject/node_modules/typescript/lib/typescript.js:45765:16)
at checkSourceElement (/Users/me/Projects/myProject/node_modules/typescript/lib/typescript.js:46779:28)
at Object.forEach (/Users/me/Projects/myProject/node_modules/typescript/lib/typescript.js:1506:30)
at checkSourceFileWorker (/Users/me/Projects/myProject/node_modules/typescript/lib/typescript.js:46862:20)
at checkSourceFile (/Users/me/Projects/myProject/node_modules/typescript/lib/typescript.js:46842:13)

…Ok, So I decided to stop and ionic serve --lab and start over. Now, I can’t lift the app again…it’s display this on the console window…

Refused to apply style from ‘http://localhost:8100/build/main.css’ because its MIME type (‘text/html’) is not a supported stylesheet MIME type, and strict MIME checking is enabled.
?ionicplatform=android:49 GET http://localhost:8100/build/vendor.js net::ERR_ABORTED
?ionicplatform=android:52 GET http://localhost:8100/build/main.js net::ERR_ABORTED
?ionicplatform=ios&ionicstatusbarpadding=true:1 Refused to apply style from ‘http://localhost:8100/build/main.css’ because its MIME type (‘text/html’) is not a supported stylesheet MIME type, and strict MIME checking is enabled.
?ionicplatform=ios&ionicstatusbarpadding=true:49 GET http://localhost:8100/build/vendor.js net::ERR_ABORTED
?ionicplatform=ios&ionicstatusbarpadding=true:52 GET http://localhost:8100/build/main.js net::ERR_ABORTED
?ionicplatform=android&http://localhost:8100/ionic-lab&http://localhost:8100/ionic-lab:1 Refused to apply style from ‘http://localhost:8100/build/main.css’ because its MIME type (‘text/html’) is not a supported stylesheet MIME type, and strict MIME checking is enabled.
?ionicplatform=android&http://localhost:8100/ionic-lab&http://localhost:8100/ionic-lab:49 GET http://localhost:8100/build/vendor.js net::ERR_ABORTED
?ionicplatform=android&http://localhost:8100/ionic-lab&http://localhost:8100/ionic-lab:52 GET http://localhost:8100/build/main.js net::ERR_ABORTED
?ionicplatform=ios&ionicstatusbarpadding=true:49 GET http://localhost:8100/build/vendor.js net::ERR_ABORTED
?ionicplatform=ios&ionicstatusbarpadding=true:1 Refused to execute script from ‘http://localhost:8100/build/vendor.js’ because its MIME type (‘text/html’) is not executable, and strict MIME type checking is enabled.
?ionicplatform=android&http://localhost:8100/ionic-lab&http://localhost:8100/ionic-lab:49 GET http://localhost:8100/build/vendor.js net::ERR_ABORTED
?ionicplatform=android&http://localhost:8100/ionic-lab&http://localhost:8100/ionic-lab:1 Refused to execute script from ‘http://localhost:8100/build/vendor.js’ because its MIME type (‘text/html’) is not executable, and strict MIME type checking is enabled.
?ionicplatform=ios&ionicstatusbarpadding=true:52 GET http://localhost:8100/build/main.js net::ERR_ABORTED
?ionicplatform=ios&ionicstatusbarpadding=true:1

Same here. It was working 3 days ago. Today this error started after upgrading CLI from 3.19.1 to 3.20.0. I don’t whether that’s the reason or not.

Reinstall the typescript…I solved in this way

sir i have already using 3.20.0 but still now working?

Hi, sorry, any luck with this problem? in my team we’re experiencing this issue…

I couldn’t find a proper solution, but I create a new project and moved src folder to new one and then installed the dependencies.

so it seems the problem is attributable to things like caching or versions.
the solution should be a list of consecutive attempts:

  • relaunch ionic serve,
  • delete the www folder,
  • reinstall plugins and node_modules,
  • re-map the solution on another path in the FS,
  • resinstall node.
    Me and my team (for now) are not experiencing this problem anymore, and each one of us did one of those things.