Uncaught SyntaxError: Cannot use import statement outside a module
anthonysun0726 opened this issue · comments
anthonysun0726 commented
Uncaught SyntaxError: Cannot use import statement outside a module
zcy commented
请描述清楚
MaFuyan commented
可能是这样一个Error?执行yarn build之后,错误提示:
/usr/share/yarn/lib/cli.js:46100
let {
^
SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object. (/usr/share/yarn/bin/yarn.js:24:13)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)
zcy commented
请检查 yarn 的版本。或者直接使用编译好的 crx
yarn -v
1.17.3