Webpack5 failed
See original GitHub issueUPD: the problem is after
npm install --save @walletconnect/web3-provider
Is this project alive? Webpack5 is already not young, but compilation of this lib fails with messages:
ERROR in ./node_modules/xhr2-cookies/dist/xml-http-request.js 21:11-26
Module not found: Error: Can't resolve 'http' in 'node_modules\xhr2-cookies\dist'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "http": require.resolve("stream-http") }'
- install 'stream-http'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "http": false }
@ ./node_modules/xhr2-cookies/dist/index.js 6:9-38
@ ./node_modules/@walletconnect/http-connection/dist/esm/index.js 2:0-46 4:47-61
@ ./node_modules/@walletconnect/web3-provider/dist/esm/index.js 3:0-60 268:28-42
@ ./src/components/BodyTop/index.jsx 8:0-65 147:29-50
@ ./src/components/AppIndex/AppIndex.jsx 3:0-37 7:133-140
@ ./src/components/AppIndex/index.js 1:0-31 1:0-31
@ ./src/components/index.js 2:0-27 2:0-27
@ ./src/index.jsx 3:0-35 4:41-44
and a lot of the same errors:
Can't resolve 'https'
Can't resolve 'util' in 'node_modules\web3-provider-engine\util'
Can't resolve 'os' in '\node_modules\xhr2-cookies\dist'
Issue Analytics
- State:
- Created 2 years ago
- Reactions:6
- Comments:12
Top Results From Across the Web
webpack 5: Failed to parse source map from "@mswjs ...
Describe the bug. New webpack 5.0 throwing compilation error regarding source map not found image. there are multiple of these, but for the ......
Read more >Upgrade to Webpack 5 failing - node.js - Stack Overflow
Failed to compile. Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
Read more >Webpack 5 Issues | Documentation - Web3Auth
This issue is caused due to the fact that the web3.js and ethers.js packages have certain dependencies, which are not present within the...
Read more >Webpack 5 Pollyfill Error - AlgoSDK - Algorand Forum
I posted this Issue on GitHub for a bug in PeraWallet Connect. However, the PeraWallet team has been unable to solve it.
Read more >To v5 from v4 - webpack
Level 1: Schema validation fails. Configuration options have changed. There should be a validation error with a BREAKING CHANGE: note, or a hint...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We use CRA 5, and to fix the problem I installed craco, created
craco.config.js
and put thereAnd then install all necessary packages
yarn add stream-browserify url assert util stream-http https-browserify os-browserify buffer
. Everything works fine but I still get those source maps warnings @Wemmons831 mentionedIm also getting the same error 😦(