'How to avoid duplication of module "bn.js" in webpack production build?
Solution 1:[1]
This likely happens because your dependencies all require different versions of bn.js
. You could try to define one specific version in the resolutions list in your package.json
:
{
// ...
"resolutions": {
"bn.js": "^5.1.1"
}
}
Keep in mind that newer versions might contain breaking changes which some of the dependencies depended on. You could evaluate your package-lock.json
or yarn.lock
to see what versions of bn.js
are required throughout the dependencies and compare that with the changelog
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |