net::ERR_ABORTED 404 (Not Found) - and TailwindCSS

I have the following problem.

GET http://localhost:63342/Imc/src/public/js/script.js net::ERR_ABORTED 404 (Not Found).

This error occurs when I'm trying to import a modal in the script file type module as per print. And the index.html file is in SRC and the script.js in PUBLIC.


1 comment

The leading slashes in script URL ("/public/js/script.js") tell the browser to resolve URLs from the web server root. But the built-in web server serves files from http://localhost:63342/<project name>, so no resources can be loaded from http://localhost:63342 - thus the issue. There is unfortunately no way to set it up to use project root as server document root. I can only suggest using URLs relative to current .html file instead of URLs with leading slashes, or use a different web server to host your apps.

Note that we have added some fixes recently that make (most) of absolute paths work on the built-in web server, see But some problems still remain, see, for example


Please sign in to leave a comment.