chanind / hanzi-writer

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

import error in VUE #219

Closed yxxhero closed 3 years ago

yxxhero commented 3 years ago

微信图片_20210224084216

yxxhero commented 3 years ago
Module parse failed: Unexpected token (104:31)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|   return obj;
| }
> const ua = globalObj.navigator?.userAgent || '';
| const isMsBrowser = ua.indexOf('MSIE ') > 0 || ua.indexOf('Trident/') > 0 || ua.indexOf('Edge/') > 0; // eslint-disable-next-line @typescript-eslint/no-empty-function
|

 @ ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./src/App.vue?vue&type=script&lang=js 3:18-41
 @ ./src/App.vue?vue&type=script&lang=js
 @ ./src/App.vue
 @ ./src/main.js
 @ multi (webpack)-dev-server/client?http://10.0.2.6:8080&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js

@chanind Please help me! thanks very much!

zhuxinrui commented 3 years ago

同问

yxxhero commented 3 years ago

@zhuxinrui how do you slove it?

chanind commented 3 years ago

It looks your node version doesn't support optional chaining. What version of node are you using? I think it should work in the current node LTS (node 14) and newer. I'll update the build to remove this optional chaining later today to support older node versions as well.

yxxhero commented 3 years ago

Thank you very much! Which time the new version will be released? I need it. Thank you very much again!

yxxhero commented 3 years ago

14.15.3 @chanind node version

chanind commented 3 years ago

:tada: This issue has been resolved in version 3.0.3 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

chanind commented 3 years ago

Hopefully this should be fixed in 3.0.3. Let me know if it still has issues!

yxxhero commented 3 years ago

v 3.0.3 is ok! @chanind

chanind commented 3 years ago

out of curiosity, where did the screenshot in this issue come from? I noticed #220 also used the same screenshot. Is it from stack overflow or somewhere similar?

yxxhero commented 3 years ago

We are friend. There is a question I want to know? As a Chinese, I am very curious why you write this library?

chanind commented 3 years ago

I wrote it because I've been learning Chinese for a long time, and I hoped that the tools for learning Chinese could integrate stroke order diagrams and stroke quizzes like this. Chinese characters are really difficult for me to remember 😅. Also it was a fun project to work on. I was really surprised it's become so popular in China!

yxxhero commented 3 years ago

This library can teach chiese children write chinese characters! It's very cool! Thanks very much again. Can we communicate in Chinese? @chanind

chanind commented 3 years ago

应该可以的,但是关于编程我的中文不太好,所以我怕说错 😅