Closed cumtb1909 closed 4 years ago
安装下这个,问题就解决了,npm install babel-plugin-dynamic-import-webpack --save-dev,简直了!
Hi @cumtb1909 ,
安装下这个,问题就解决了,npm install babel-plugin-dynamic-import-webpack --save-dev,简直了!
Do you mind to share your package.json? I followed your suggestion above but no luck still got an error. Btw i use yarn instead of npm.
感觉进入了死循环,安装了,启动时说这个就说Cannot find module '@umijs/preset-ui' from '/Users/wangxinyue/popmart/matrix' 安装了 @umijs/preset-ui 启动成功就This experimental syntax requires enabling the parser plugin: 'optionalChaining' (169:24)
最后有解决的方法吗?
SyntaxError: This experimental syntax requires enabling the parser plugin: 'optionalChaining' (169:24) at Object.raise (E:\Code\antetc\antetc\node_modules\@umijs\block-sdk\node_modules\@babel\parser\lib\index.js:6344:17) at Object.expectPlugin (E:\Code\antetc\antetc\node_modules\@umijs\block-sdk\node_modules\@babel\parser\lib\index.js:7664:18) at Object.parseSubscript (E:\Code\antetc\antetc\node_modules\@umijs\block-sdk\node_modules\@babel\parser\lib\index.js:8448:12) at Object.parseSubscript (E:\Code\antetc\antetc\node_modules\@umijs\block-sdk\node_modules\@babel\parser\lib\index.js:5288:18) at Object.parseSubscripts (E:\Code\antetc\antetc\node_modules\@umijs\block-sdk\node_modules\@babel\parser\lib\index.js:8434:19) at Object.parseExprSubscripts (E:\Code\antetc\antetc\node_modules\@umijs\block-sdk\node_modules\@babel\parser\lib\index.js:8423:17) at Object.parseMaybeUnary (E:\Code\antetc\antetc\node_modules\@umijs\block-sdk\node_modules\@babel\parser\lib\index.js:8393:21) at Object.parseMaybeUnary (E:\Code\antetc\antetc\node_modules\@umijs\block-sdk\node_modules\@babel\parser\lib\index.js:5668:20) at Object.parseExprOps (E:\Code\antetc\antetc\node_modules\@umijs\block-sdk\node_modules\@babel\parser\lib\index.js:8280:23) at Object.parseMaybeConditional (E:\Code\antetc\antetc\node_modules\@umijs\block-sdk\node_modules\@babel\parser\lib\index.js:8253:23) at Object.parseMaybeAssign (E:\Code\antetc\antetc\node_modules\@umijs\block-sdk\node_modules\@babel\parser\lib\index.js:8200:21) at Object.parseMaybeAssign (E:\Code\antetc\antetc\node_modules\@umijs\block-sdk\node_modules\@babel\parser\lib\index.js:5628:20) at Object.parseExpression (E:\Code\antetc\antetc\node_modules\@umijs\block-sdk\node_modules\@babel\parser\lib\index.js:8148:23) at Object.jsxParseExpressionContainer (E:\Code\antetc\antetc\node_modules\@umijs\block-sdk\node_modules\@babel\parser\lib\index.js:3450:30) at Object.jsxParseElementAt (E:\Code\antetc\antetc\node_modules\@umijs\block-sdk\node_modules\@babel\parser\lib\index.js:3544:36) at Object.jsxParseElement (E:\Code\antetc\antetc\node_modules\@umijs\block-sdk\node_modules\@babel\parser\lib\index.js:3587:17) { pos: 4282, loc: Position { line: 169, column: 24 }, missingPlugin: [ 'optionalChaining' ]
添加区块,点击确定,无法添加;
Context