circular-dependency-plugin
circular-dependency-plugin copied to clipboard
DeprecationWarning: The `util._extend` API is deprecated
Error
(node:78938) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
at new CircularDependencyPlugin (/Users/dennisat/dev/x-company/x-project/node_modules/.pnpm/[email protected][email protected][email protected]_/node_modules/circular-dependency-plugin/index.js:8:20)
at Object.<anonymous> (/Users/dennisat/dev/x-company/x-project/packages/mhc-ui-components/webpack.plugins.js:9:5)
...
This because the
let extend = require('util')._extend
Is deprecated.
Can you fix it please?
https://github.com/aackerman/circular-dependency-plugin/pull/100
Would love to see this fixed as well. I quite like this plugin.
The project here is abandoned. I published @gpoitch's patch under a new name and added the types from @types/circular-dependency-plugin
This is not a maintained fork, it just solves this single issue until this package is maintained again, if ever.
npm rm circular-dependency-plugin @types/circular-dependency-plugin
npm install @fregante/circular-dependency-plugin --save-dev
And then replace your imports
- import CircularDependencyPlugin from "circular-dependency-plugin";
+ import CircularDependencyPlugin from "@fregante/circular-dependency-plugin";
Thank you very much, @fregante. For anyone finding his solution and passing by, I'll add that, for me, the package is only a dev dependency. Install as appropriate for you.
Oh right, I updated the commands to save as dev dependency.