Hey Replit community!
While trying to dynamically open a page and display some data I fetched from Node.js server, I’ve got an error in the console Refused to execute script from 'https://.../js/act.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled
. In total I have 2 pages which fetch the data from server and display it in browser. With the first page (account.js) I have no problems, it works perfectly, but after connecting second page (which works the same way - gets server’s data and displays it) I’ve discovered this error. First page still works fine but the second doesn’t.
Repl: https://replit.com/@entcode/ejs?v=1
Also, the console shows an 404 error ‘act.js’ not found, however such file is presented and its directory is used via app.use()
. Here are the screenshots:
When I include the contents of the script file into EJS file (pure <script></script>
tags without src
attribute specified), everything works fine. May it be a bug of Replit that doesn’t see the file?
What should I do to fix the error?