DanWahlin / Angular-JumpStart

Angular and TypeScript JumpStart example application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Error] TypeError: ‘text/html’ is not a valid JavaScript MIME type. promiseReactionJob

BhavikCpatel opened this issue · comments

I get the following error when I start application using "npm start" in the browser console log.

[Error] TypeError: ‘text/html’ is not a valid JavaScript MIME type. promiseReactionJob

I'd make sure you ran through all of the steps listed in the readme. We just ran this with a training class this week and didn't hit any issues, but if you did run through those steps and still get the error let me know. I'd need more details about the steps used though.

Here's the log, It seems everything fine in terminal but both my browser [safari and chrome - latest version] log error in console [Error] TypeError: ‘text/html’ is not a valid JavaScript MIME type. promiseReactionJob. Not sure if this information helps to you or need more info.

#####@My-MacBook-Pro Angular-JumpStart % nvm ls
->     v12.16.1
default -> node (-> v12.16.1)
node -> stable (-> v12.16.1) (default)
stable -> 12.16 (-> v12.16.1) (default)
iojs -> N/A (default)
lts/* -> lts/erbium (-> v12.16.1)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.17.0 (-> N/A)
lts/dubnium -> v10.19.0 (-> N/A)
lts/erbium -> v12.16.1
#####@My-MacBook-Pro Angular-JumpStart % nvm current
v12.16.1
#####@My-MacBook-Pro Angular-JumpStart % node -v
v12.16.1
#####@My-MacBook-Pro Angular-JumpStart % npm install

> fsevents@1.2.11 install /Users/#####/projects/ang-arch/Angular-JumpStart/node_modules/angular-playground/node_modules/fsevents
> node-gyp rebuild

  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
  SOLINK_MODULE(target) Release/fse.node

> fsevents@1.2.11 install /Users/#####/projects/ang-arch/Angular-JumpStart/node_modules/watchpack/node_modules/fsevents
> node-gyp rebuild

  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
  SOLINK_MODULE(target) Release/fse.node

> fsevents@1.2.11 install /Users/#####/projects/ang-arch/Angular-JumpStart/node_modules/webpack-dev-server/node_modules/fsevents
> node-gyp rebuild

  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
  SOLINK_MODULE(target) Release/fse.node

> puppeteer@1.20.0 install /Users/#####/projects/ang-arch/Angular-JumpStart/node_modules/puppeteer
> node install.js

Downloading Chromium r686378 - 110.2 Mb [====================] 100% 0.0s 
Chromium downloaded to /Users/#####/projects/ang-arch/Angular-JumpStart/node_modules/puppeteer/.local-chromium/mac-686378

> core-js@3.6.0 postinstall /Users/#####/projects/ang-arch/Angular-JumpStart/node_modules/@angular-devkit/build-angular/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
> https://opencollective.com/core-js 
> https://www.patreon.com/zloirock 

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)


> core-js@2.6.11 postinstall /Users/#####/projects/ang-arch/Angular-JumpStart/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"


> core-js@3.6.4 postinstall /Users/#####/projects/ang-arch/Angular-JumpStart/node_modules/karma/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"


> @angular/cli@9.0.2 postinstall /Users/#####/projects/ang-arch/Angular-JumpStart/node_modules/@angular/cli
> node ./bin/postinstall/script.js

npm WARN angular-jump-start@0.0.0 No repository field.

added 1983 packages from 1235 contributors and audited 1758320 packages in 78.456s

35 packages are looking for funding
  run `npm fund` for details

found 20 moderate severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details
#####@My-MacBook-Pro Angular-JumpStart % npm start

> angular-jump-start@0.0.0 start /Users/#####/projects/ang-arch/Angular-JumpStart
> node server.js

/Users/#####/projects/ang-arch/Angular-JumpStart
Express listening on port 8080

Thanks for the info. Let me see if I can replicate that error.

thanks

I'm not able to replicate that error on Mac or Windows with any browser unfortunately. I'm running Node 12.16.1 as well. We had a training class this past week and it didn't pop up there either for any students. Here's the output in my console:

2020-03-07_15-07-37

Do you have any browser extensions installed that could be doing something potentially?

It's hard to say what could be causing that without being able to replicate the issue. This is the first time I've had that issue reported for this app over the years so I suspect something else is at play here.

If it's not something like an extension the only thing I can think to do is delete node_modules and reinstall the packages, load the app, and then dump the cache completely. If you're still getting it then there's definitely something weird going on.

My bad, I believe I forgot to run Run ng build --watch to build and bundle the code

However, the report error is not helpful in browser so I didn't realize at first place.
sorry about this.

Glad you got it going. Definitely a bad error by the browser.