When accessing the site, you see an error like:
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of ""
- You're accessing the site through Apache (https://yahudim.app) but haven't deployed the production build
- OR the JavaScript files don't have proper MIME type configuration
-
Deploy the production build (if not done):
cd /home/ishaglcy/public_html/yahudim.app ./deploy.sh -
Verify .htaccess is in place:
ls -la /home/ishaglcy/public_html/yahudim.app/.htaccess
-
Check file permissions:
ls -la /home/ishaglcy/public_html/yahudim.app/index.html ls -la /home/ishaglcy/public_html/yahudim.app/assets/
Files should be owned by
ishaglcy:ishaglcywith:index.html: 644 permissionsassets/: 755 permissionsassets/*.js: 644 permissions
-
Fix permissions if needed:
cd /home/ishaglcy/public_html/yahudim.app chown -R ishaglcy:ishaglcy index.html assets .htaccess vite.svg chmod 644 index.html .htaccess vite.svg chmod 755 assets chmod 644 assets/*
-
Clear browser cache and reload
npm run dev
# Access at: http://localhost:5173./deploy.sh
# Access at: https://yahudim.appImportant: Don't access the live site URL while running npm run dev - they serve different things!
# Find and kill the process
lsof -ti:5173 | xargs kill -9# Clean and rebuild
rm -rf node_modules dist
npm install
npm run build# Verify files exist
ls -la /home/ishaglcy/public_html/yahudim.app/assets/
# Redeploy
./deploy.shEnsure mod_rewrite is enabled on Apache:
a2enmod rewrite
systemctl restart httpd
# OR on some systems:
systemctl restart apache2curl -I https://yahudim.app/curl -I https://yahudim.app/assets/index-*.js | grep Content-TypeShould return: Content-Type: application/javascript
ls -la /home/ishaglcy/public_html/yahudim.app/ | grep -E '(index|assets|htaccess)'If anything goes wrong, you can always redeploy:
cd /home/ishaglcy/public_html/yahudim.app
./deploy.shThis will:
- Rebuild the app
- Copy files to web root
- Fix permissions automatically