Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

134
Views
javascript module in with nginx

I'm setting a webserver on my local machine using nginx, but I'm not able to run javascript. When I try to import a javascript file as a module, I run into "Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec". My nginx configuration file looks like this:

user nginx nginx;
worker_processes 1;

error_log /var/log/nginx/error_log info;

http {
    include /etc/nginx/mime.types;
    server {
      location / {
        root /home/jyoung/Web/Test1/www;
      }     
      location /images/ {
        root /home/jyoung/Web/Test1;
      }
    }
}

events {
    worker_connections 1024;
    use epoll;
}

I have restarted nginx every time I've made edits. I'd be grateful for any tips.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!