Console Error:

scripts.js ERR_FILE_NOT_FOUND

Pointed his way

<script type="text/javascript" src="/js/scripts.js"></script> 

In fact, the Path looks like this:

 C:\Users\admin\Dropbox\stameska.ru\src\js\scripts.js 
  • one
    Try this: <script type="text/javascript" src="js/scripts.js"></script> - Yuri
  • writes Failed to load resource: net :: ERR_FILE_NOT_FOUND - stiv
  • one
    Show the address of the html file - Yuri
  • C: \ Users \ admin \ Dropbox \ stameska.ru \ src \ index.html - stiv
  • Strange, it should work with the address "js / scripts.js" . Is the address correct? - Yuri

2 answers 2

Choose:

  1. Run a real http server. Then the absolute path will be considered relative to it, and not relative to the root of the disk. With nodejs, you can:

     npm i -g http-server http-server -p 3000 src 
  2. Use relative path to script:

     <script type="text/javascript" src="js/scripts.js"></script> 
  • did not help. Failed to load resource: the server responded with a status of 404 (Not Found) - stiv
 <script type="text/javascript" src="js/scripts.js"></script> 
  • 3
    Will not work .. - Yuri