-
Notifications
You must be signed in to change notification settings - Fork 85
Open
Description
`
import { Chart } from '@berryv/g2-react';
{/* 图表测试 */}
<Chart
options={{
type: 'interval',
width: 640,
height: 480,
data: [
{ genre: 'Sports', sold: 275 },
{ genre: 'Strategy', sold: 115 },
{ genre: 'Action', sold: 120 },
{ genre: 'Shooter', sold: 350 },
{ genre: 'Other', sold: 150 },
],
encode: { x: 'genre', y: 'sold' },
}}
/>`
刷新就会报错
Server Error
ReferenceError: exports is not defined in ES module scope
This file is being treated as an ES module because it has a '.js' file extension and '/my/DB-GPT-Web-main/node_modules/@berryv/g2-react/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
这是什么原因?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels