Open yannbertrand opened 1 year ago
Wow thank you for openning this issue, I was pulling my hair to understand why the dev server wasn't working anymore ! I confirm that removing prettier (and probably downgrade to v2) solves the issue.
To add a bit more context : this does not affect the production build.
The errors are all like this:
Uncaught Error: Module build failed (from ./node_modules/babel-loader/lib/index.js): SyntaxError: /var/mistic/Photo-Sphere-Viewer/node_modules/@vuepress/core/lib/client/components/GlobalLayout.vue: Unexpected token, expected "," (1:8)
I don't really understand what could cause that as prettier has no dependencies at all (confirmed by looking at the diff of my yarn.lock file).
I confirm that removing prettier (and probably downgrade to v2) solves the issue.
I confirm that downgrading prettier to v2 works as well, without reformating.
Thanks for the context additions!
Bug report
Steps to reproduce
yarn create vuepress-site
cd docs && yarn install
yarn add -D prettier
yarn dev
Example codesandbox: https://codesandbox.io/p/sandbox/sharp-sanne-f5rkww
What is expected?
VuePress dev server should launch with no issues.
What is actually happening?
VuePress dev server launch with errors, the http://localhost:8080 web page displays a blank page with the devtools full of errors.
Other relevant information
npx vuepress info
in my VuePress project: