Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

项目无法正常启动,进入例子页面时,报错Unexpected token 'function' #84

Open
CYBYOB opened this issue Oct 12, 2023 · 6 comments

Comments

@CYBYOB
Copy link

CYBYOB commented Oct 12, 2023

报错:
如下图
image

排查:自己初步看了下,是如下的代码中的script出了问题,但我不知道如何修复~
image

@CYBYOB
Copy link
Author

CYBYOB commented Oct 12, 2023

复现步骤:

  1. git clone
  2. 切换至 dev 分支(其实用 gh-pages 也一样)
  3. npm run compile:example
  4. yarn
  5. 访问 http://127.0.0.1:3002/en/editor.html?c=line-simple
  6. 报错
    image

环境

node v16.0.0
yarn 1.22.19
npm 7.10.0
image

其他现象

点击图标下面的下载按钮,下载出来的html文件能正常显示图表
image

@songlai
Copy link

songlai commented Oct 27, 2023

遇到了相同的错误。
image
还有高版本的 webpack 无法生成 example-bundle 文件,改了 package.json 中的版本号,才能运行的。

@1096015776
Copy link

我参照readme的执行了compile,跑起来也是这样的报错,我们需要做什么呢

@plainheart
Copy link
Member

蛮神奇的,我一直在更新代码,似乎还没遇见过这个错误,大家可以再试试最新代码看看。后续我也找个干净的环境安装运行看看。

@duanxingyu
Copy link

蛮神奇的,我一直在更新代码,似乎还没遇见过这个错误,大家可以再试试最新代码看看。后续我也找个干净的环境安装运行看看。

我也是同样的问题!报这个错误
Uncaught SyntaxError: Unexpected token 'function' (at VM307 about:srcdoc:169:1)

@duanxingyu
Copy link

蛮神奇的,我一直在更新代码,似乎还没遇见过这个错误,大家可以再试试最新代码看看。后续我也找个干净的环境安装运行看看。

我也是同样的问题!报这个错误 Uncaught SyntaxError: Unexpected token 'function' (at VM307 about:srcdoc:169:1)

试着回退到这次提交就没问题了 6110ae007a014a15c7dbb6c7e50feb9ce7c87d16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants