Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

failed to load module script: expected a javascript module script but the server responded with a mime type of "text/html"

Change your script from:
<script type="text/html" src="main.js"></script>
to:
<script type="module" src="main.js"></script>
Comment

expected a javascript module script but the server responded with a mime type of "text/html"

Might be a CORS issue
Comment

PREVIOUS NEXT
Code Example
Javascript :: run javascript in html 
Javascript :: how to run a bash script with node js 
Javascript :: chrome storage local example 
Javascript :: get data from json placeholder 
Javascript :: onpress setstate react native 
Javascript :: chart js two layer label 
Javascript :: text input placeholder font family react native 
Javascript :: rerender a vue component 
Javascript :: var x = 
Javascript :: image react 
Javascript :: update map value javascript 
Javascript :: second largest number in array javascript 
Javascript :: explain the exclamation mark in js 
Javascript :: javascript get next 15min 
Javascript :: js variable 
Javascript :: get input js 
Javascript :: .fetch method 
Javascript :: format json command line 
Javascript :: make multiple api call using promise.all 
Javascript :: axios forward 
Javascript :: use font awsome in react 
Javascript :: react native clear route params 
Javascript :: javascript getters and setters 
Javascript :: jquery selector class child 
Javascript :: nan javascript 
Javascript :: node-schedule npm 
Javascript :: mongo connect npm 
Javascript :: get id value jquery 
Javascript :: remove falsy values from array with lodash 
Javascript :: node.js error handling process 
ADD CONTENT
Topic
Content
Source link
Name
2+5 =