angular-seed: Production Build wrong paths - Windows 10
Hello Guys, I have been trying to make a production build. However, when I try to run it after it has been built, the browser cannot load the necessary node_modules and files necessary.
OS: Windows 10 Node version: 5.10.1 npm version: 3.8.3 Browsers: chrome 50.0.2661.75 m, firefox 45.0.2
After running npm run build.dev
there are no errors, but when I try to open the production build, it tells me that files are missing.
Here is a screenshot of the console errors:
What I can see is that after I run the production build, it changes the paths of all the files to wrong ones. The absolute path looks for node_modules on C:\ which I find kind of odd.
Anyone facing a similar issue on windows ?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 16 (9 by maintainers)
I see this happening only when you open it up from the file system(for e.g. on double clicking the index.html).
If I host it on a server, everything works fine.
@mgechev I manually solved it by modifying the index.html file.
If anyone is facing the same issue. Delete this line:
<base href="/">
And modify the following three lines:
By removing the first /
@mgechev I made a few changes. More specifically, I added a couple of components but I didn’t mess with any configuration file. I will try to make a fresh clone and share with you guys the result.