You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by 张睿哲 <zh...@qq.com.INVALID> on 2021/10/15 08:33:02 UTC

As a newcomer, I just used VS Code and Echarts questions

Hello, I stopped at the first step of introduction to Echarts in introduction.
First I install echarts with NPM, and require('echarts') in CMD with normal output,
But in js (import * as echarts from 'echarts';)&nbsp;,Uncaught SyntaxError: Cannot use import statement outside a module
The specific screenshots are in the attachment. I am looking forward to your reply. Thank you for reading.



······


您好,我在入门篇的引入Echarts的第一步停住了。首先我用npm install了echarts,并在cmd 中require('echarts')有正常的输出,
但在js中 (import * as echarts from 'echarts';)会报错(Uncaught SyntaxError: Cannot use import statement outside a module)
具体截图在附件中,期待您的回信,感谢阅读。