怎么解决Failed to load resource: net::ERR_FILE_NOT_FOUND
时间: 2023-12-02 13:43:22 浏览: 500
解决浏览器报错Failed to load resource: net::ERR_FILE_NOT_FOUND的方法如下:
1.可能是跨域问题,推荐使用火狐浏览器做跨域,之后也用火狐访问。
2.在地址栏输入 about:config,找到security.fileuri.strict_origin_policy,把true改为false即可。
相关问题
Failed to load resource: net::ERR_FILE_NOT_FOUND index.html:1 Access to script at 'file:///D:/static/js/index-2d27bd93.js' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https. index-2d27bd93.js:1 Failed to load resource: net::ERR_FAILED /D:/static/nlogo.ico:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
从错误信息来看,第一个错误是 `Failed to load resource: net::ERR_FILE_NOT_FOUND`,说明浏览器无法找到 `index-2d27bd93.js` 文件。这个可能是因为你的服务器没有正确地映射到 `static` 目录,请确保你的服务器配置正确,并且能够正确地映射到这个目录。
另一个错误是 `Access to script at 'file:///D:/static/js/index-2d27bd93.js' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https.`。这个错误是因为浏览器禁止从本地文件系统加载跨域脚本。你需要在一个服务器环境中运行你的应用程序,例如在 `http://localhost` 上运行你的应用程序。
还有一个错误是 `Failed to load resource: net::ERR_FILE_NOT_FOUND /D:/static/nlogo.ico:1`,这个错误是因为浏览器无法找到 `nlogo.ico` 文件。你需要确保这个文件存在于正确的路径中,并且能够被正确地映射到。
Failed to load resource: net::ERR_FILE_NOT_FOUND
This error message typically appears in a web browser's console when it is unable to find a requested resource (such as an image, script, or stylesheet) on the server or locally on the computer.
Possible causes of this error include:
1. The file has been deleted or moved.
2. The file name or path is incorrect.
3. The file is being served from an incorrect location.
4. There is a typo or error in the code that is requesting the resource.
To fix the issue, you can try the following steps:
1. Check the file name and path to ensure that it is correct and the file exists in that location.
2. Verify that the file is being served from the correct location.
3. Clear your browser cache and reload the page.
4. Check for any typos or errors in the code that is requesting the resource.
5. If the file is stored on a server, ensure that the server is running and accessible.
阅读全文