You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "Linjianwei99 (via GitHub)" <gi...@apache.org> on 2023/09/05 02:47:27 UTC
[GitHub] [echarts] Linjianwei99 opened a new issue, #19078: [Bug] import * as echarts from 'echarts/core' get error: export * from './lib/export/core.js';
Linjianwei99 opened a new issue, #19078:
URL: https://github.com/apache/echarts/issues/19078
### Version
5.4.3
### Link to Minimal Reproduction
no
### Steps to Reproduce
1、import * as echarts from 'echarts/core'
2、get error:
export * from './lib/export/core.js';
^^^^^^
SyntaxError: Unexpected token 'export'
at Object.compileFunction (node:vm:352:18)
at wrapSafe (node:internal/modules/cjs/loader:1033:15)
at Module._compile (node:internal/modules/cjs/loader:1069:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
### Current Behavior
export * from './lib/export/core.js';
^^^^^^
SyntaxError: Unexpected token 'export'
at Object.compileFunction (node:vm:352:18)
at wrapSafe (node:internal/modules/cjs/loader:1033:15)
at Module._compile (node:internal/modules/cjs/loader:1069:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
### Expected Behavior
no error
### Environment
```markdown
- OS:
- Browser:
- Framework:
```
### Any additional comments?
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] dongfangtianyu commented on issue #19078: [Bug] import * as echarts from 'echarts/core' get error: export * from './lib/export/core.js';
Posted by "dongfangtianyu (via GitHub)" <gi...@apache.org>.
dongfangtianyu commented on issue #19078:
URL: https://github.com/apache/echarts/issues/19078#issuecomment-1727175172
Hi, I have encountered the same issue, node.js version: 18.12
to @Ovilia Please :
that the code written by the user is
```
import * as echarts from 'echarts/core'
```
while the code written by eccharts is
```
export * from './lib/export/core.js';
```
https://github.com/apache/echarts/blob/fa231d37fe2788f5c8dfa5a86299ea8339d60897/build/template/core.js#L20
> where you should use import * from instead of export * from
So, it seems to be related to Echarts
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] Ovilia commented on issue #19078: [Bug] import * as echarts from 'echarts/core' get error: export * from './lib/export/core.js';
Posted by "Ovilia (via GitHub)" <gi...@apache.org>.
Ovilia commented on issue #19078:
URL: https://github.com/apache/echarts/issues/19078#issuecomment-1706040876
Hi. This is a typical JavaScript question (where you should use `import * from` instead of `export * from`) and does not relate to ECharts. So I'm going to close this issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] Ovilia closed issue #19078: [Bug] import * as echarts from 'echarts/core' get error: export * from './lib/export/core.js';
Posted by "Ovilia (via GitHub)" <gi...@apache.org>.
Ovilia closed issue #19078: [Bug] import * as echarts from 'echarts/core' get error: export * from './lib/export/core.js';
URL: https://github.com/apache/echarts/issues/19078
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
Re: [I] [Bug] import * as echarts from 'echarts/core' get error: export * from './lib/export/core.js'; [echarts]
Posted by "a327958099 (via GitHub)" <gi...@apache.org>.
a327958099 commented on issue #19078:
URL: https://github.com/apache/echarts/issues/19078#issuecomment-1858753485
> 嗨。这是一个典型的 JavaScript 问题(您应该使用 `import * from` 而不是 `export * from`),与 ECharts 无关。所以我要关闭这个问题。
✓ Creating an optimized production build
✓ Compiled successfully
Collecting page data ../Users/acme/Desktop/project/WorkGPT/node_modules/.pnpm/echarts@5.4.3/node_modules/echarts/core.js:20
export * from './lib/export/core.js';
^^^^^^
SyntaxError: Unexpected token 'export'
这不是你组件里面的export问题吗?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
Re: [I] [Bug] import * as echarts from 'echarts/core' get error: export * from './lib/export/core.js'; [echarts]
Posted by "homj (via GitHub)" <gi...@apache.org>.
homj commented on issue #19078:
URL: https://github.com/apache/echarts/issues/19078#issuecomment-2862463012
@Ovilia this is still an open issue and e.g. occurs when running jest.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
Re: [I] [Bug] import * as echarts from 'echarts/core' get error: export * from './lib/export/core.js'; [echarts]
Posted by "Antonytm (via GitHub)" <gi...@apache.org>.
Antonytm commented on issue #19078:
URL: https://github.com/apache/echarts/issues/19078#issuecomment-1787995023
@Ovilia It is related to Echarts. It seems that something is wrong with JS modules in ECharts.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org