You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I installed and imported EthereumProvider as suggested in the npm package info, using import { EthereumProvider } from "@walletconnect/ethereum-provider. However, my TS project cannot compile and I get the following error:
Error: require() of ES Module /home/lorenzo/work/tide-protocol/frontend/node_modules/@web3modal/standalone/dist/index.js from /home/lorenzo/work/tide-protocol/frontend/node_modules/@walletconnect/ethereum-provider/dist/index.cjs.js not supported.
Instead change the require of index.js in /home/lorenzo/work/tide-protocol/frontend/node_modules/@walletconnect/ethereum-provider/dist/index.cjs.js to a dynamic import() which is available in all CommonJS modules.
To Reproduce
My package.json is just a list of dependencies and scripts. No configurations. This is my tsconfig.json:
Same issue here. In my scenario, it fails inside my test suite.
I found a workaround though for anyone that wants to bypass this error.
Instead of importing like: import EthereumProvider from '@walletconnect/ethereum-provider';
try importing import EthereumProvider from '@walletconnect/ethereum-provider/dist/index.umd.js';
For me, this is not the most convenient way because then i lose the TS support and it requires some more workarounds for mapping the TS declarations to this object. Its just nasty.
I assume its some misconfiguration in the package.json and closely related to this issue: #341
Describe the bug
I installed and imported
EthereumProvider
as suggested in the npm package info, usingimport { EthereumProvider } from "@walletconnect/ethereum-provider
. However, my TS project cannot compile and I get the following error:To Reproduce
My
package.json
is just a list of dependencies and scripts. No configurations. This is mytsconfig.json
:Expected behavior
Should import as expected with no compile errors.
Desktop:
The text was updated successfully, but these errors were encountered: