I want to deploy an Angular 12 app that uses d3-org-chart
, which in turn imports d3-flextree
. When I start my project using ng build
it generates the following error:
./node_modules/d3-flextree/src/flextree.js:247:19-26 - Error: Should not import the named export 'version' (imported as 'version') from default-exporting module (only default export is available soon)
I can see that the error was fixed in the project GitHub repository in this commit, and I made the same change locally and it works fine.
Another developer has raised an issue on the project page to get the NPM package updated.
My issue is that the code was fixed in github, but not updated on NPM. So when I use npm install
, or when I deploy my app in a docker container which then runs ng build
it pulls down the outdated NPM version and the error occurs, preventing startup.
Obviously, this will be fixed when the maintainer updates the NPM package, but until this happens what is the least ugly solution to enable me to deploy my docker container without the error?