A
Alokai•15mo ago
h_a_z_e_l_

Error on Vue+Laravel routing.

Hello, Do you have experience on this error? ChunkLoadError: Loading chunk resources_js_components_frontend_pages_user_security-settings_vue failed. (error: http://localhost/lekit/store/screwfix-fraserburgh-fwnry/public/frontend/js/chunks-162/resources_js_components_frontend_pages_user_security-settings_vue.d5a29fdb48757fb6.js) The thing is that the chunk file is at https://localhost/lekit/public/frontend/js/chunks-162/... not at https://localhost/lekit/store/screwfix.../public/frontend/chunks-162...
1 Reply
rohrig
rohrig•15mo ago
Hi @h_a_z_el 👋 , Here are a few potential causes and solutions: Network Issues: The error might be due to a network issue that is preventing the chunk from being loaded. Check your network connection and ensure that the server is running and accessible. Incorrect Public Path: Webpack needs to know where to look for chunk files, which is specified by the publicPath configuration. If this is not set correctly, it could lead to loading errors. Make sure your publicPath in your webpack config is set correctly. Caching Issues: If an old version of the chunk is cached, it can cause loading errors. You might need to implement a cache-busting strategy, such as adding a content hash to the filename. Build Issues: There might be an issue with the build process itself. Try rebuilding your application and see if the error persists. File or Directory Issues: The error message indicates that the chunk file cannot be found. Check if the file or directory exists and is correctly referenced in your code. Remember to always clear your browser cache or hard reload your page after making these changes, as the browser might still serve the old, cached version of your application. If none of these suggestions help, could you provide more context or details about your setup? That would help in giving a more accurate solution.
Want results from more Discord servers?
Add your server