-
Notifications
You must be signed in to change notification settings - Fork 53
Description
Expected Behaviour
The quick start docs say I need these packages for react:
// Install Libraries
npm install @pushprotocol/restapi@latest @pushprotocol/socket@latest ethers@^5.7
Here are the errors when only installing these:
ERROR in ./node_modules/@ethereumjs/util/node_modules/micro-ftch/index.js 54:17-32
Module not found: Error: Can't resolve 'http'
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 }
ERROR in ./node_modules/@ethereumjs/util/node_modules/micro-ftch/index.js 55:18-34
Module not found: Error: Can't resolve 'https'
ERROR in ./node_modules/@ethereumjs/util/node_modules/micro-ftch/index.js 56:17-32
Module not found: Error: Can't resolve 'zlib'
ERROR in ./node_modules/@ethereumjs/util/node_modules/micro-ftch/index.js 58:36-50
Module not found: Error: Can't resolve 'url'
Current Behaviour
I cannot init user:
const userAlice = await PushAPI.initialize(signer, {
env: CONSTANTS.ENV.STAGING,
});
Steps to Reproduce
Follow quick start docs: install packages and initialize user random ethers wallet.