Electron Failed to load Module

spiderhamer

When I try to load my Angular Project as an Electron app, I get the following error:

Failed to load module script: The server responded with a non-JavaScript MIME type of "". Strict MIME type checking is enforced for module scripts per HTML spec.**

I used this tutorial to create the application and now I'm trying to add some components. So my code is similar to the one supplied in the tutorial I just added the Homecomponent with ng generate.

https://malcoded.com/posts/angular-desktop-electron/

The solution that was given in the tutorials comment section isn't working for me or maybe I'm doing something wrong.

Dirkmal

I faced the same issue recently and after some research discovered this error is caused by Angular 8 not adding MIME types to Typescript files converted to js. If you ng serve and inspect the page, you'll notice the js scripts have a type of "module", this confuses Electron. There are several workarounds, as discussed in this GitHub issue.

What worked for me was simply changing the "target" property in the "compilerOptions" of tsconfig.json to "es5".

I hope someone finds this useful.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to fix: "Failed to load module script ..." Angular 8, Electron 5

From Dev

how to load electron module in typescript

From Dev

Failed to load kafka module

From Dev

Error with Firebase on Electron app: Failed to load gRPC

From Dev

Haskell Failed to load interface for module

From Dev

Failed to load module in Angular JS

From Dev

Failed to load module "canberra-gtk-module"

From Dev

electron-webpack-react error "Module parse failed: Unexpected character '@'"

From Dev

The Module "aspnetcorev2.dll" failed to load

From Dev

Wildfly Failed to Load Module for Oracle Driver

From

Android Firebase DynamiteModule: Failed to load module descriptor

From Dev

How do I properly load the lit-html module in Electron

From Dev

Gtk-Message: Failed to load module "pantheon-filechooser-module"

From Dev

Gtk-Message: Failed to load module “pantheon-filechooser-module”

From Dev

How to fix error: Failed to load module "canberra-gtk-module"

From Dev

What is a "Failed to load module "module-ladspa-sink"" error?

From Dev

Gtk Failed to load module "pantheon-filechooser-module"

From Dev

Problems with importing Tensoflow in Jupyter. DLL load failed. Specific module failed to load

From Dev

ImportError: DLL load failed: The specified module could not be found for numpy

From Dev

pyodbc ImportError: DLL load failed: The specified module could > not be found

From Dev

Python: ImportError: DLL load failed: The specified module could not be found

From Dev

py2exe failed to load specified module

From Dev

"Failed to load module" error for Firebird datasource on WildFly 8.1.0.Final

From Java

ImportError: DLL load failed: The specified module could not be found

From Java

ImportError: DLL load failed: The specified module could not be found

From Dev

Express routing static file: Failed to load module script

From Dev

Pyjnius. ImportError: DLL load failed: The specified module was not found

From Dev

Pyinstaller: Import Error: DLL load failed: The specified module could not be found

From Dev

NLTK ImportError: DLL load failed: The specified module could not be found

Related Related

  1. 1

    How to fix: "Failed to load module script ..." Angular 8, Electron 5

  2. 2

    how to load electron module in typescript

  3. 3

    Failed to load kafka module

  4. 4

    Error with Firebase on Electron app: Failed to load gRPC

  5. 5

    Haskell Failed to load interface for module

  6. 6

    Failed to load module in Angular JS

  7. 7

    Failed to load module "canberra-gtk-module"

  8. 8

    electron-webpack-react error "Module parse failed: Unexpected character '@'"

  9. 9

    The Module "aspnetcorev2.dll" failed to load

  10. 10

    Wildfly Failed to Load Module for Oracle Driver

  11. 11

    Android Firebase DynamiteModule: Failed to load module descriptor

  12. 12

    How do I properly load the lit-html module in Electron

  13. 13

    Gtk-Message: Failed to load module "pantheon-filechooser-module"

  14. 14

    Gtk-Message: Failed to load module “pantheon-filechooser-module”

  15. 15

    How to fix error: Failed to load module "canberra-gtk-module"

  16. 16

    What is a "Failed to load module "module-ladspa-sink"" error?

  17. 17

    Gtk Failed to load module "pantheon-filechooser-module"

  18. 18

    Problems with importing Tensoflow in Jupyter. DLL load failed. Specific module failed to load

  19. 19

    ImportError: DLL load failed: The specified module could not be found for numpy

  20. 20

    pyodbc ImportError: DLL load failed: The specified module could > not be found

  21. 21

    Python: ImportError: DLL load failed: The specified module could not be found

  22. 22

    py2exe failed to load specified module

  23. 23

    "Failed to load module" error for Firebird datasource on WildFly 8.1.0.Final

  24. 24

    ImportError: DLL load failed: The specified module could not be found

  25. 25

    ImportError: DLL load failed: The specified module could not be found

  26. 26

    Express routing static file: Failed to load module script

  27. 27

    Pyjnius. ImportError: DLL load failed: The specified module was not found

  28. 28

    Pyinstaller: Import Error: DLL load failed: The specified module could not be found

  29. 29

    NLTK ImportError: DLL load failed: The specified module could not be found

HotTag

Archive