ngx-charts
ngx-charts copied to clipboard
Error compiling with Angular 13 and Yarn 3.2 PnP
Description
Currently receiving errors when trying to compile using Angular 13 and Yarn 3.2 PnP.
ngx-charts
version: 20.0.1
Errors
./.yarn/__virtual__/@swimlane-ngx-charts-virtual-f07287554d/0/cache/@swimlane-ngx-charts-npm-20.0.1-dcde534266-145f7c04b8.zip/node_modules/@swimlane/ngx-charts/fesm2015/swimlane-ngx-charts.mjs:16:0-39 - Error: Module not found: Error: Can't resolve 'd3-ease' in 'C:\_p\network-toolbox\.yarn\__virtual__\@swimlane-ngx-charts-virtual-f07287554d\0\cache\@swimlane-ngx-charts-npm-20.0.1-dcde534266-145f7c04b8.zip\node_modules\@swimlane\ngx-charts\fesm2015'
./.yarn/__virtual__/@swimlane-ngx-charts-virtual-f07287554d/0/cache/@swimlane-ngx-charts-npm-20.0.1-dcde534266-145f7c04b8.zip/node_modules/@swimlane/ngx-charts/fesm2015/swimlane-ngx-charts.mjs:17:0-35 - Error: Module not found: Error: Can't resolve 'clone-deep' in 'C:\_p\network-toolbox\.yarn\__virtual__\@swimlane-ngx-charts-virtual-f07287554d\0\cache\@swimlane-ngx-charts-npm-20.0.1-dcde534266-145f7c04b8.zip\node_modules\@swimlane\ngx-charts\fesm2015'
Specifically errors about d3-ease
and clone-deep
.
On another note, d3-ease
is used by d3-brush
which has a v3
now which supports modules (https://github.com/d3/d3-brush/releases/tag/v3.0.0) which may or may not make Angular happier. Just food for thought.
Dependeicies which had problems and their dependency tree:
I'll also note, that I also receive the same errors when using the new pnpm
linker instead of the node-modules
one.
consider installing the d3 dependencies seperately
npm install d3 d3-array d3-brush d3-color d3-force d3-format d3-hierarchy d3-interpolate d3-scale d3-selection d3-shape d3-time-format --save-dev
consider installing the d3 dependencies seperately
npm install d3 d3-array d3-brush d3-color d3-force d3-format d3-hierarchy d3-interpolate d3-scale d3-selection d3-shape d3-time-format --save-dev
Firstly, I'm using yarn
. This isn't a good option as they will not be resolved by this library as they are not peerDependencies
. The same error persists.
I have the same problem with npm. Does anyone have a solution?
For clone-deep, see #1688.
I have the same problem with npm. Does anyone have a solution?
For me the solution has been to stay in version 19.0.1 #1686. They marked this as solved by #1727 but so far it is not included on the current version (20.0.1).