0

I been trying to host my laravel filament project into my server using apache but upon deployment i met 2 problem i never seen before

pic related

Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "". Strict MIME type checking is enforced for module scripts per HTML spec.

and

Uncaught (in promise) TypeError: Failed to fetch dynamically imported module: http://103.179.216.68/js/filament/forms/components/select.js?v=3.0.0.0

this is my apache vhost config

<VirtualHost *:80>
    DocumentRoot "C:/xampp/htdocs/Infakin-2.0/public"
    ServerName panelinfakin.ictitlmi.info
    <Directory "C:/xampp/htdocs/Infakin-2.0/public">
            Options Indexes FollowSymLinks Includes ExecCGI
            AllowOverride All
            Order allow,deny
            allow from all
            Require all granted
        </Directory>
</VirtualHost>

and last when development using artisan serve the problem isn't appearing so that's make me suspicius there's a problem with my xampp apache, thank you so much in advance.

New contributor
Gagas Amukti is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
2
  • If your project includes javascript then you should checkout this link stackoverflow.com/questions/12935119/… , to enable .js meme type in apache 22 hours ago
  • thank you so much for answering i just did what in stackoverlow told me to do and basically no luck, i both use the first answer in my apache vhost config and the second in my mime config apache still no luck 21 hours ago

1 Answer 1

0

Silakan dicoba dengan menggunakan htaccess berikut: Options -MultiViews -Indexes

RewriteEngine On

# Handle MIME type for JavaScript files
<FilesMatch "\.(js)$">
    ForceType 'text/javascript'
</FilesMatch>

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
New contributor
nanang is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .