You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using echarts, echarts-gl, zrender in an Angular project, the build fails due to unresolved module imports. The errors indicate missing dependencies within echarts and zrender, such as:
X [ERROR] Could not resolve "echarts/lib/util/layout"
node_modules/echarts-gl/lib/coord/geo3DCreator.js:3:30:
3 │ import { getLayoutRect } from 'echarts/lib/util/layout';
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~
The module "./lib/util/layout" was not found on the file system:
node_modules/echarts/package.json:223:11:
223 │ "./*": "./*"
╵ ~~~~~
Import from "echarts/lib/util/layout.js" to get the file "node_modules/echarts/lib/util/layout.js":
node_modules/echarts-gl/lib/coord/geo3DCreator.js:3:54:
3 │ import { getLayoutRect } from 'echarts/lib/util/layout';
│ ^
╵ .js
You can mark the path "echarts/lib/util/layout" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
X [ERROR] Could not resolve "echarts/lib/util/layout"
node_modules/echarts-gl/lib/coord/globeCreator.js:3:30:
3 │ import { getLayoutRect } from 'echarts/lib/util/layout';
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~
The module "./lib/util/layout" was not found on the file system:
node_modules/echarts/package.json:223:11:
223 │ "./*": "./*"
╵ ~~~~~
Import from "echarts/lib/util/layout.js" to get the file "node_modules/echarts/lib/util/layout.js":
node_modules/echarts-gl/lib/coord/globeCreator.js:3:54:
3 │ import { getLayoutRect } from 'echarts/lib/util/layout';
│ ^
╵ .js
You can mark the path "echarts/lib/util/layout" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
X [ERROR] Could not resolve "echarts/lib/coord/cartesian/Cartesian"
node_modules/echarts-gl/lib/coord/grid3D/Cartesian3D.js:2:22:
2 │ import Cartesian from 'echarts/lib/coord/cartesian/Cartesian';
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The module "./lib/coord/cartesian/Cartesian" was not found on the file system:
node_modules/echarts/package.json:223:11:
223 │ "./*": "./*"
╵ ~~~~~
Import from "echarts/lib/coord/cartesian/Cartesian.js" to get the file "node_modules/echarts/lib/coord/cartesian/Cartesian.js":
node_modules/echarts-gl/lib/coord/grid3D/Cartesian3D.js:2:60:
2 │ import Cartesian from 'echarts/lib/coord/cartesian/Cartesian';
│ ^
╵ .js
You can mark the path "echarts/lib/coord/cartesian/Cartesian" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
X [ERROR] Could not resolve "echarts/lib/util/layout"
node_modules/echarts-gl/lib/coord/grid3DCreator.js:4:30:
4 │ import { getLayoutRect } from 'echarts/lib/util/layout';
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~
The module "./lib/util/layout" was not found on the file system:
node_modules/echarts/package.json:223:11:
223 │ "./*": "./*"
╵ ~~~~~
Import from "echarts/lib/util/layout.js" to get the file "node_modules/echarts/lib/util/layout.js":
node_modules/echarts-gl/lib/coord/grid3DCreator.js:4:54:
4 │ import { getLayoutRect } from 'echarts/lib/util/layout';
│ ^
╵ .js
You can mark the path "echarts/lib/util/layout" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
X [ERROR] Could not resolve "zrender/lib/animation/requestAnimationFrame"
node_modules/echarts-gl/lib/core/LayerGL.js:20:34:
20 │ ...AnimationFrame from 'zrender/lib/animation/requestAnimationFrame';
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The module "./lib/animation/requestAnimationFrame" was not found on the file system:
node_modules/zrender/package.json:87:11:
87 │ "./*": "./*"
╵ ~~~~~
Import from "zrender/lib/animation/requestAnimationFrame.js" to get the file "node_modules/zrender/lib/animation/requestAnimationFrame.js":
node_modules/echarts-gl/lib/core/LayerGL.js:20:78:
20 │ ...AnimationFrame from 'zrender/lib/animation/requestAnimationFrame';
│ ^
╵ .js
You can mark the path "zrender/lib/animation/requestAnimationFrame" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
X [ERROR] Could not resolve "zrender/lib/animation/Animator"
node_modules/echarts-gl/lib/util/animatableMixin.js:1:21:
1 │ import Animator from 'zrender/lib/animation/Animator';
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The module "./lib/animation/Animator" was not found on the file system:
node_modules/zrender/package.json:87:11:
87 │ "./*": "./*"
╵ ~~~~~
Import from "zrender/lib/animation/Animator.js" to get the file "node_modules/zrender/lib/animation/Animator.js":
node_modules/echarts-gl/lib/util/animatableMixin.js:1:52:
1 │ import Animator from 'zrender/lib/animation/Animator';
│ ^
╵ .js
You can mark the path "zrender/lib/animation/Animator" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
X [ERROR] Could not resolve "zrender/lib/core/LRU"
node_modules/echarts-gl/lib/util/graphicGL.js:11:21:
11 │ import LRUCache from 'zrender/lib/core/LRU';
╵ ~~~~~~~~~~~~~~~~~~~~~~
The module "./lib/core/LRU" was not found on the file system:
node_modules/zrender/package.json:87:11:
87 │ "./*": "./*"
╵ ~~~~~
Import from "zrender/lib/core/LRU.js" to get the file "node_modules/zrender/lib/core/LRU.js":
node_modules/echarts-gl/lib/util/graphicGL.js:11:42:
11 │ import LRUCache from 'zrender/lib/core/LRU';
│ ^
╵ .js
You can mark the path "zrender/lib/core/LRU" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
Even though echarts, echarts-gl, and zrender are installed, the Angular build process cannot resolve these imports. The error suggests marking the missing paths as external, but this approach leaves unresolved imports in the bundle, which is not a viable solution.
The provided package.json and angular.json files define a minimal reproducible setup that demonstrates the issue.
When using echarts, echarts-gl, zrender in an Angular project, the build fails due to unresolved module imports. The errors indicate missing dependencies within echarts and zrender, such as:
"echarts/lib/util/layout"
"echarts/lib/coord/cartesian/Cartesian"
"zrender/lib/animation/requestAnimationFrame"
Even though echarts, echarts-gl, and zrender are installed, the Angular build process cannot resolve these imports. The error suggests marking the missing paths as external, but this approach leaves unresolved imports in the bundle, which is not a viable solution.
The provided package.json and angular.json files define a minimal reproducible setup that demonstrates the issue.
angular.json
package.json
tsconfig.json
The text was updated successfully, but these errors were encountered: