{ "success": false, "statusCode": 404, "message": "ENOENT: no such file or directory, stat '/opt/render/project/src/server/client/dist/index.html'" }

I performed my deploy and build normally, after both were successful, when trying to access my web application I got this error {
“success”: false,
“statusCode”: 404,
“message”: “ENOENT: no such file or directory, stat ‘/opt/render/project/src/server/client/dist/index.html’”
When building locally, everything happens correctly.

Below are some screenshots of my application:

In the “ENOENT” error line:

“message”: “ENOENT: no such file or directory, stat ‘/opt/render/project/src/server/client/dist/index.html’”

The reference to /src/server/client/dist/index.html seems to suggest that the configuration serving the index.html file is invalid, I assume the server/ directory reference should not be there.

After replacing with path.join(process.cwd(), ‘client’, ‘dist’, ‘index.html’) I no longer have the error, but now I have a blank screen and in my console I have: Failed to load module script: "Expected a JavaScript module script but the server responded with a MIME type of “text/html”. Strict MIME type checking is enforced for module scripts per HTML spec.’

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.