echarts icon indicating copy to clipboard operation
echarts copied to clipboard

[Bug] Could not resolve zrender dependency (pnpm/workspace)

Open danielleroux opened this issue 1 year ago • 0 comments

Version

5.5.1

Link to Minimal Reproduction

https://github.com/danielleroux/pnpm-angular-issue

Steps to Reproduce

  1. Clone https://github.com/danielleroux/pnpm-angular-issue
  2. Execute pnpm install
  3. 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

danielleroux avatar Oct 14 '24 10:10 danielleroux