Vue-cli: Failed to load resource: the server responded with a status of 404 (Not Found) app.c2115832.js:1

Created on 26 Jul 2018  路  9Comments  路  Source: vuejs/vue-cli

I use 'vue ui' and create project . I run the build command without changing anything. When I run the index.html file from the generated dist folder, I get a few errors in the console

Failed to load resource: the server responded with a status of 404 (Not Found)
app.c2115832.js:1 
Failed to load resource: the server responded with a status of 404 (Not Found)
chunk-vendors.fb29d323.js:1 
Failed to load resource: the server responded with a status of 404 (Not Found)
app.c2115832.js:1 
Failed to load resource: the server responded with a status of 404 (Not Found)
app.8d0d60ac.css:1 
Failed to load resource: the server responded with a status of 404 (Not Found)

the files are in the folder

| - index.html
| - favicon.ico
|  css
|  | - app.8d0d60ac.css
|  js
|  | - app.c2115832.js
|  | - app.c2115832.js.map
|  | - chunk-vendors.fb29d323.js
|  | - chunk-vendors.fb29d323.js.map
|  img
|  | - logo.82b9c7a5.png

do I have to make extra adjustments?

Most helpful comment

Use baseUrl: '' in that case.

All 9 comments

Hello, your issue has been closed because it does not conform to our issue requirements. In order to ensure every issue provides the necessary information for us to investigate, we require the use of the Issue Helper when creating new issues. Thank you!

You need to serve the directory over HTTP. It does not work over file://.

https://cli.vuejs.org/guide/deployment.html#previewing-locally

I tried using xampp localhost. the same problem

That's my url address
'http://localhost/dist/'

I changing the question. I want to make sure that I can run it on any website after using the build

Use baseUrl: '' in that case.

thank so much. I used baseUrl '' and solved problem

thank so much. I used baseUrl '' and solved problem

How solve men?

The config value is here FYI ... https://cli.vuejs.org/config/#global-cli-config ... You need to create a vue.config.js file next to the package.json in the root of the project. This is helpful to get Vue to build files that will work nicely with Cordova and Android builds.

I solved this problem by removing the mode: "history"
Screenshot from 2019-10-23 19-24-14

just add this line on vue.config.js
publicPath: ''

Was this page helpful?
0 / 5 - 0 ratings

Related issues

BusyHe picture BusyHe  路  3Comments

csakis picture csakis  路  3Comments

NathanKleekamp picture NathanKleekamp  路  3Comments

jgribonvald picture jgribonvald  路  3Comments

JIANGYUJING1995 picture JIANGYUJING1995  路  3Comments