vue-cli: New project with Vue 3 and typescript not working - SyntaxError: Unexpected token u in JSON at position 0
Version
4.5.4
Environment info
macos 10.14.4
node 14.5
Steps to reproduce
Create a new project with Vue version 3, typescript option
What is expected?
Build to work when npm run serve
What is actually happening?
Build failed.
@ ./src/App.vue?vue&type=template&id=7ba5bd90 1:0-379 1:0-379 @ ./src/App.vue @ ./src/main.ts @ multi (webpack)-dev-server/client?http://192.168.0.149:8080&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.ts
error in ./src/views/About.vue?vue&type=template&id=039c5b43
Syntax Error: SyntaxError: Unexpected token u in JSON at position 0 at JSON.parse (<anonymous>)
@ ./src/views/About.vue?vue&type=template&id=039c5b43 1:0-396 1:0-396 @ ./src/views/About.vue @ ./src/router/index.ts @ ./src/main.ts @ multi (webpack)-dev-server/client?http://192.168.0.149:8080&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.ts
error in ./src/views/Home.vue?vue&type=template&id=fae5bece
Syntax Error: SyntaxError: Unexpected token u in JSON at position 0 at JSON.parse (<anonymous>)
@ ./src/views/Home.vue?vue&type=template&id=fae5bece 1:0-395 1:0-395 @ ./src/views/Home.vue @ ./src/router/index.ts @ ./src/main.ts @ multi (webpack)-dev-server/client?http://192.168.0.149:8080&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.ts
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 4
- Comments: 17 (6 by maintainers)
Update the dependencies.
In a TS project? I’m gonna release a patch later today.
Vue Version: 3.0.2 Vue Loader Version: 16.0.0-beta.8