Relative Content

Tag Archive for javascriptnode.js

the display header type doesn’t match, and I need to read both the js file and the html file, what should I do?

I’m a programming learner.,I found lottie at the beginning of the year.,I found that I can AE and front-end at the same time.,That’s very convenient for me.,So I’m going to try to use it this vacation.,But I found that it’s just html,css,javascript will have cross-domain restrictions.,Asked GPT I used to build a server.,And then it happened that I would be part of the node.js.,I used node.js.,But it always gets an error.,The problem is now:
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of “text/html”. Strict MIME type checking is enforced for module scripts per HTML spec.
I’m really sad that today is the third day.
enter image description here

await Promise.all is not working as expect in a for-loop

const promise1 = new Promise((resolve) => setTimeout(resolve, 1000, ‘Promise 1’)); const promise2 = new Promise((resolve) => setTimeout(resolve, 1000, ‘Promise 2’)); const promise3 = new Promise((resolve) => setTimeout(resolve, 1000, ‘Promise 3’)); const promise4 = new Promise((resolve) => setTimeout(resolve, 1000, ‘Promise 4’)); const promise5 = new Promise((resolve) => setTimeout(resolve, 1000, ‘Promise 5’)); const promise6 = new Promise((resolve) […]