SyntaxError: Unexpected token ‘.‘
SyntaxError: Unexpected token '.'C:\Users\86156\Desktop\Vue3学习\vue3_cli_test1\node_modules\@vue\compiler-core\dist\compiler-core.cjs.js:3261if (grandparent?.source) {^SyntaxError: Unexpected token '.'
·
SyntaxError: Unexpected token '.'
C:\Users\86156\Desktop\Vue3学习\vue3_cli_test1\node_modules\@vue\compiler-core\dist\compiler-core.cjs.js:3261
if (grandparent?.source) {
^
SyntaxError: Unexpected token '.'
at Module._compile (internal/modules/cjs/loader.js:895:18)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Function.Module._load (internal/modules/cjs/loader.js:727:14)
at Module.require (internal/modules/cjs/loader.js:852:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (C:\Users\86156\Desktop\Vue3学习\vue3_cli_test1\node_modules\@vue\compiler-core\index.js:6:20)
at Module._compile (internal/modules/cjs/loader.js:959:30)
at Object.Module._extensions..js (internal/modules/cjs/loadenpm ERR! code ELIFECYCLE
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vue3_cli_test1@0.1.0 serve script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\86156\AppData\Roaming\npm-cache\_logs\2022-05-20T07_18_15_942Z-debug.log
跟着尚硅谷的视频准备学习 Vue3,创建项目结果运行就报错了!好像是没办法识别
.?
这个es6 的新的运算符。下面的方法都试了还是一直报这样的错。有没有人遇到这样的错误呀,救命!
- 更新 vue-cli 版本
- 有博客说是node版本太高了?更新 node 版本,用了12和10的都不行
现在的版本:
报错:
更多推荐
已为社区贡献1条内容
所有评论(0)