G
G
Gimir2019-06-02 01:53:51
React
Gimir, 2019-06-02 01:53:51

What causes the "Faled to load resource....." error in React after npm run build?

After compiling the layout through the create-react-app - build script and opening index.html through the browser, I get these three errors: Has
5cf301ba46404339182344.png
anyone come across this before? I searched on Google, I did not find solutions, any ideas?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Spirin, 2019-06-02
@Gimir

You must use a web server, not open the file through a browser.

G
grinat, 2019-06-02
@grinat

There is a parameter in the webpack settings, like publicPath, by default there is a slash, remove it and the browser will load the files. Or open index.html and manually remove the slash at the beginning in the file paths.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question