Repository navigation
Self-reference dependency has unused export name: This should not happen #13983
Description
Bug report
I've been trying to port our webpack 4 app over to v5 and everything went great in development. But when I tried to fix our production build, I get a bunch of these (many from the aws-iot-device-sdk-v2 and lodash packages.
The reason I'm flagging this as a bug report is because there is currently no way I can find to figure this out. It COULD be user error (but since its all coming from node_modules I tend to think not) but without this issue/error being documented (or at least I couldn't find it) I'm unsure how to proceed.
Can someone point me in the proper direction of how to go about debugging/fixing this? #11673 is the only bug I can find and that was fixed in 5.11, I'm running 5.50 right now so I'm at a loss.
ERROR in ./node_modules/aws-crt/dist.browser/browser.js
Self-reference dependency has unused export name: This should not happen
Error: Self-reference dependency has unused export name: This should not happen
at CommonJsSelfReferenceDependencyTemplate.apply (/home/justin/code/openpath/Platinum/node_modules/webpack/lib/dependencies/CommonJsSelfReferenceDependency.js:102:10)
at JavascriptGenerator.sourceDependency (/home/justin/code/openpath/Platinum/node_modules/webpack/lib/javascript/JavascriptGenerator.js:205:12)
at JavascriptGenerator.sourceModule (/home/justin/code/openpath/Platinum/node_modules/webpack/lib/javascript/JavascriptGenerator.js:112:9)
at JavascriptGenerator.generate (/home/justin/code/openpath/Platinum/node_modules/webpack/lib/javascript/JavascriptGenerator.js:98:8)
at NormalModule.codeGeneration (/home/justin/code/openpath/Platinum/node_modules/webpack/lib/NormalModule.js:1144:22)
at /home/justin/code/openpath/Platinum/node_modules/webpack/lib/Compilation.js:2732:22
at /home/justin/code/openpath/Platinum/node_modules/webpack/lib/Cache.js:93:5
at Hook.eval [as callAsync] (eval at create (/home/justin/code/openpath/Platinum/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
at Cache.get (/home/justin/code/openpath/Platinum/node_modules/webpack/lib/Cache.js:75:18)
at ItemCacheFacade.get (/home/justin/code/openpath/Platinum/node_modules/webpack/lib/CacheFacade.js:117:15)
@ ./node_modules/aws-iot-device-sdk-v2/dist/index.js 38:18-36
@ ./app/global/mqtt/sagas.js 41:0-40 204:19-29
@ ./app/routes/AuthenticatedContainer/route.js
@ ./app/routes/AppContainer/index.js 55:0-69 177:290-308
@ ./app/app.prod.js 26:0-38 153:15-18
@ ./app/app.js
What is the current behavior?
The build for production fails with Self-reference dependency has unused export name: This should not happen from some npm modules and I'm not sure how to diagnose
If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
I would expect the build to work in production since it worked with a very similar development build.
Other relevant information:
webpack version: webpack 5.50.0
Node.js version: v14.16.1
Operating System: Windows 11 (WSL2 Ubuntu 20.04)
Additional tools:
Full log available here: https://gist.github.com/framerate/a9bc07caef3c6c5e842ad3417b25398a
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
webpack-bot commentedon Aug 12, 2021
For maintainers only: