79327787

Date: 2025-01-03 22:07:41
Score: 2.5
Natty:
Report link

GET file:///E:/main-KPJ5OKOH.js net:ERR_FILE_NOT_FOUND

This kind of error usually happens when your index.html uses absolute paths to scripts, styles, etc., like /main-KPJ5OKOH.js. Electron will look of the file in the system's (or drive's) root directory. The same issue occurs when you have <base href="/"> in index.html, which seems to be inserted by Angular by default.

What you can do is setting the the base URL to something like . or ./ either in your angular.json, index.html, or via build flag:

ng build --base-href .

See also:

Reasons:
  • Blacklisted phrase (1): How should I
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (0.5):
Posted by: mwopitz