chanind / hanzi-writer

Chinese character stroke order animations and practice quizzes
https://hanziwriter.org
MIT License
3.47k stars 539 forks source link

webpack打包报错Unhandled Rejection #229

Closed Psilocine closed 3 years ago

Psilocine commented 3 years ago

vue: 2.6.11(vue/cli 4.1.1) node: 10.23.3 hanzi-writer: 3.1.0、3.0.3(2.3.0不报错)

起初以为是charDataLoader没有catch导致,后面发现只要 import 就会报错,希望能帮忙看一下是什么问题🙏

Promise {
   { SyntaxError: Unexpected token (1:4092)
      at Parser.pp$5.raise (/Users/psilolau/Desktop/projects/PAPERANG/paperang-wrong-topic/node_modules/babylon/lib/index.js:4454:13)
      at Parser.pp.unexpected (/Users/psilolau/Desktop/projects/PAPERANG/paperang-wrong-topic/node_modules/babylon/lib/index.js:1761:8)
      at Parser.pp$3.parseIdentifier (/Users/psilolau/Desktop/projects/PAPERANG/paperang-wrong-topic/node_modules/babylon/lib/index.js:4332:10)
      at Parser.pp$3.parsePropertyName (/Users/psilolau/Desktop/projects/PAPERANG/paperang-wrong-topic/node_modules/babylon/lib/index.js:4156:96)
      at Parser.pp$3.parseObj (/Users/psilolau/Desktop/projects/PAPERANG/paperang-wrong-topic/node_modules/babylon/lib/index.js:4045:12)
      at Parser.pp$3.parseExprAtom (/Users/psilolau/Desktop/projects/PAPERANG/paperang-wrong-topic/node_modules/babylon/lib/index.js:3719:19)
      at Parser.pp$3.parseExprSubscripts (/Users/psilolau/Desktop/projects/PAPERANG/paperang-wrong-topic/node_modules/babylon/lib/index.js:3494:19)
      at Parser.pp$3.parseMaybeUnary (/Users/psilolau/Desktop/projects/PAPERANG/paperang-wrong-topic/node_modules/babylon/lib/index.js:3474:19)
      at Parser.pp$3.parseExprOps (/Users/psilolau/Desktop/projects/PAPERANG/paperang-wrong-topic/node_modules/babylon/lib/index.js:3404:19)
      at Parser.pp$3.parseMaybeConditional (/Users/psilolau/Desktop/projects/PAPERANG/paperang-wrong-topic/node_modules/babylon/lib/index.js:3381:19)
      at Parser.pp$3.parseMaybeAssign (/Users/psilolau/Desktop/projects/PAPERANG/paperang-wrong-topic/node_modules/babylon/lib/index.js:3344:19)
      at Parser.pp$1.parseVar (/Users/psilolau/Desktop/projects/PAPERANG/paperang-wrong-topic/node_modules/babylon/lib/index.js:2340:24)
      at Parser.pp$1.parseVarStatement (/Users/psilolau/Desktop/projects/PAPERANG/paperang-wrong-topic/node_modules/babylon/lib/index.js:2169:8)
      at Parser.pp$1.parseStatement (/Users/psilolau/Desktop/projects/PAPERANG/paperang-wrong-topic/node_modules/babylon/lib/index.js:1861:19)
      at Parser.pp$1.parseBlockBody (/Users/psilolau/Desktop/projects/PAPERANG/paperang-wrong-topic/node_modules/babylon/lib/index.js:2268:21)
      at Parser.pp$1.parseBlock (/Users/psilolau/Desktop/projects/PAPERANG/paperang-wrong-topic/node_modules/babylon/lib/index.js:2247:8) pos: 4092, loc: Position { line: 1, column: 4092 } } }
chanind commented 3 years ago

Is this happening when parsing invalid JSON responses from loading a character? Or this happens immediately when you import Hanzi Writer? What steps need to be taken to reproduce this?

Psilocine commented 3 years ago

sry, it seems to be caused by our inner config. 😂😂