'Sorry, check with the site admin for error: EISDIR .. (CRA)

I've deployed on same ubuntu server two small react apps. I've divided by relative path, like /app1 and /app2, but I have problem when refreshing the page or after appending slash at the end of the url, like https://example.com/app1/ or https://example.com/app2/.

The error is: Sorry, check with the site admin for error: EISDIR.

How I can eliminate this type of error. I can't find anything related with this error with React.

I've tried both, with setting PUBLIC_URL in .env.production to /app1/ or "homepage": "/app1" in package.json.

BR,



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source