echarts
echarts copied to clipboard
[Bug] Could not resolve zrender dependency (pnpm/workspace)
Version
5.5.1
Link to Minimal Reproduction
https://github.com/danielleroux/pnpm-angular-issue
Steps to Reproduce
- Clone https://github.com/danielleroux/pnpm-angular-issue
- Execute
pnpm install - Execute
pnpm build
Current Behavior
Import echarts in app.module.ts leads to the following error stack:
my-demo-module:build: ✘ [ERROR] Could not resolve "zrender/lib/core/util.js"
my-demo-module:build:
my-demo-module:build: node_modules/echarts/lib/visual/visualDefault.js:45:24:
my-demo-module:build: 45 │ import * as zrUtil from 'zrender/lib/core/util.js';
my-demo-module:build: ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~
my-demo-module:build:
my-demo-module:build: You can mark the path "zrender/lib/core/util.js" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
my-demo-module:build:
my-demo-module:build:
my-demo-module:build: ✘ [ERROR] Could not resolve "zrender/lib/core/util.js"
my-demo-module:build:
my-demo-module:build: node_modules/echarts/lib/visual/visualSolution.js:45:24:
my-demo-module:build: 45 │ import * as zrUtil from 'zrender/lib/core/util.js';
my-demo-module:build: ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~
my-demo-module:build:
my-demo-module:build: You can mark the path "zrender/lib/core/util.js" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
Expected Behavior
ECharts needs to resolve dependency inside a workspace (pnpm)
Environment
- OS: macOS
Any additional comments?
No response