ZCY01 / jdtry

京东试用 —— 一键申请试用商品的 Chrome 浏览器拓展

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uncaught SyntaxError: Cannot use import statement outside a module

anthonysun0726 opened this issue · comments

Uncaught SyntaxError: Cannot use import statement outside a module

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)

commented

请检查 yarn 的版本。或者直接使用编译好的 crx
yarn -v
1.17.3