Vue.js App Deployment successful but failing to load page


Github Repo: GitHub - piaschwarz/RePOS-2021-MentalRotation-PS26

I depolyed my github repo through netlify and the build/deploy was successful except the warning:

The site is showing as a blank page, the web console shows a few 404 errs and loading failed errs:

GET [HTTP/2 404 Not Found 19ms]

GET [HTTP/2 404 Not Found 22ms]

GET [HTTP/2 404 Not Found 29ms]

Loading failed for the with source “”.

GET [HTTP/2 404 Not Found 34ms]

Loading failed for the with source “”.

Is the asset size limit warning the problem here? I tried fixing it with adding size information to vue.config.js but then the deployment failed:

performance: {

This is the web console error screenshot:

Hi @piaschwarz

The issue stems from vue.config.js

    process.env.NODE_ENV === 'production'
      ? '/' + require('./package.json').name + '/'
      : '/'

As the build is in production mode, the name from the package.json is added to the public path (test in this case).
However, none of the files are built to test they are built to /. For example inspecting the source I see

<script src="/test/js/app.60bb3f68.js"></script>

however the file is at /js/app.60bb3f68.js.

Hi @coelmay

thanks for the fast response and the hint.
I fixed it by setting the public path to:

publicPath: '/'

The site is now running :blush:

1 Like

Thanks for sharing your solution! This will definitely be beneficial for a future Forums member who encounters the same issue!