Webpack ( Error: net::ERR_FILE_NOT_FOUND)

Asked

Viewed 401 times

-1

I am having trouble solving the following error in Webpack: net::ERR_FILE_NOT_FOUND , type the script works correctly as the output below.

inserir a descrição da imagem aqui

But when I try to view on the Chrome console, it shows the following error:

inserir a descrição da imagem aqui

Follow the settings I made here:

inserir a descrição da imagem aqui

inserir a descrição da imagem aqui

inserir a descrição da imagem aqui

Thank you very much for your attention and help :)

  • The error says file not found, so the problem must be in the path, the most common is to forget that (./) is in the current directory, but the correct one would be a previous directory (../).

1 answer

0

Use a web server (can be a service on your computer, does not need to be remote). The access by the file:/// protocol you are using has a number of restrictions. You need to access via http or https, and for that you need to use a web server.

  • and how I do it?

  • Since you already use webpack, perhaps the simplest way is this: https://webpack.js.org/configuration/dev-server/

Browser other questions tagged

You are not signed in. Login or sign up in order to post.