Dependency @antv/g6 is attempting to import Node built-in module util.
See original GitHub issueConsider import from @antv/util
instead. As a front-end library there shouldn’t be any dependencies from nodejs.
BTW, vite’s rollup will show error:
Illegal reassignment to import 'mat3'
Illegal reassignment to import 'vec2'
But I haven’t find out which file causes this issue. Maybe related #2254.
Issue Analytics
- State:
- Created 3 years ago
- Comments:16 (6 by maintainers)
Top Results From Across the Web
SyntaxError: Cannot use import statement outside a module
But that gets me another error: "Error: Plugin/Preset files are not allowed to export objects, only functions." Here are the dependencies I ...
Read more >@antv/g6-element - npm
Start using @antv/g6-element in your project by running `npm i ... Abundant Built-in Items: Nodes and edges with free configurations; ...
Read more >skyline-console/yarn.lock at master - OpenDev
skyline-console - A modern dashboard for OpenStack - UI.
Read more >group org.webjars.npm - javalibs
Indexing of new Maven dependencies and their versions has been stopped already. ... @babel/helper-module-imports, jar, babel__helper-module-imports.
Read more >Getting Started - G6 Graph Visualization Engine | AntV
Step 2: Import the JS file to the file where G6 is going to be used: ... The properties of node and edge...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, I found a way to get a more detailed error log by using rollup, steps:
rollup.config.js
a.js
rollup!
outputs
It looks like your esm bundle result is not sound to rollup. Also,
(I guess should we edit the issue title to ‘can not use rollup to bundle this module’ or raise a new issue?)
I also have this error when I configure Rollup to use only the ES6 module of G6 (Version 4.1.4).
The file node_modules/@antv/g-webgpu-core/es/ISystem.js is empty, but the file node_modules/@antv/g-webgpu-core/es/ISystem.d.ts export the interface ISystem.