Closed danieledler closed 3 years ago
Thanks for providing steps to reproduce. Very helpful!
Surge by default ignores the node_modules folder. You can fix this on your end by adding a .surgeignore
file in the directory you upload to surge. Eg. echo '!node_modules' > dist/.surgeignore
Thank you very much, that fixes this issue!
Nuxt is on their way with a fix to not create chunks in a node_modules subfolder: https://github.com/nuxt/nuxt.js/pull/7906.
I have a static site generated with nuxt but after the upgrade from nuxt 2.10.2 to 2.14.1 it stopped render on surge.sh. When the browser gets
_nuxt/node_modules/commons.[hash].js
, the content is not from that .js file but from the main .html file, and hence the unexpected token<
(see attached screenshot).Steps to reproduce the error:
I have tried a couple of local servers and also a couple of cloud servers (netlify and commons.host) and they all work, so maybe there is something on the surge.sh servers that can be updated to fix this issue?
Thanks for any help!