Open staszek998 opened 3 years ago
Strange as heck, but my exhaustive research on this problem showed that running either rm -rf ./node-modules && rm ./package-lock.json && npm install
or npm update
solves the problem every single time.
More than 4 hours of digging through the source code and I found a solution by accident... Would love to know which exact package causes this problem but the diff log is too long for me, sorry 😃
Seems to be a problem with latest version of Vue CLI and NPM... I've no issue with Yarn actually.
Vue CLI require @vue/compiler-sfc
which require Vue 3, but project use Vue 2... bit strange, I'll try to investigate on this!
Description
ssr:serve
NPM script doesn't work with Vue 2 & TypeScript app created with Vue CLI.Reproduction steps
vue create vue2-uvue
:npm run serve
.DONE Compiled successfully in Xms \n No type errors found \n Version: typescript 3.9.9 \n Time: Xms \n App running at: \n - Local: http://localhost:8080/ \n - Network: http://192.168.X.X:8080/ \n Note that the development build is not optimized. To create a production build, run npm run build.
http://localhost:8080/
:vue add @uvue/ssr
:DONE ssr \n UVue installed, please read this before starting: \n https://universal-vue.github.io/docs/guide/post-install.html#post-installation-notes
npm run ssr:serve
.Reproduction repository
Expected behavior
Console should produce following output:
After asked to open the URL
http://localhost:8080/
, the browser should look exactly the same as it looks after running the commandnpm run serve
.Actual behavior
The browser can't locate the server/resources/whatever we're asking it for:
Google Chrome Dev:
Firefox Developer Edition:
Sizzy:
Additional thoughts
npm run serve
command still works fine and produces the correct output.npm run ssr:build && npm run ssr:start
.ssr:serve
script work just fine.Additional context
Please indicate versions of: