anza-xyz / wallet-adapter

Modular TypeScript wallet adapters and components for Solana applications.
https://anza-xyz.github.io/wallet-adapter/
Apache License 2.0
1.59k stars 960 forks source link

export 'WalletAdapterNetwork' (imported as 'WalletAdapterNetwork') was not found in '@solana/wallet-adapter-base' (module has no exports) #231

Closed keval6706 closed 2 years ago

keval6706 commented 2 years ago

Not sure what i am doing wrong.

Compiled with problems:X

ERROR in ./src/app/solana/index.js 19:18-45

export 'WalletAdapterNetwork' (imported as 'WalletAdapterNetwork') was not found in '@solana/wallet-adapter-base' (module has no exports)

ERROR in ./src/app/solana/index.js 33:30-48

export 'ConnectionProvider' (imported as 'ConnectionProvider') was not found in '@solana/wallet-adapter-react' (module has no exports)

ERROR in ./src/app/solana/index.js 35:35-49

export 'WalletProvider' (imported as 'WalletProvider') was not found in '@solana/wallet-adapter-react' (module has no exports)

ERROR in ./node_modules/@solana/wallet-adapter-react-ui/lib/WalletConnectButton.js 29:6-15

export 'useWallet' (imported as 'useWallet') was not found in '@solana/wallet-adapter-react' (module has no exports)

ERROR in ./node_modules/@solana/wallet-adapter-react-ui/lib/WalletDisconnectButton.js 28:6-15

export 'useWallet' (imported as 'useWallet') was not found in '@solana/wallet-adapter-react' (module has no exports)

ERROR in ./node_modules/@solana/wallet-adapter-react-ui/lib/WalletModal.js 19:6-15

export 'useWallet' (imported as 'useWallet') was not found in '@solana/wallet-adapter-react' (module has no exports)

ERROR in ./node_modules/@solana/wallet-adapter-react-ui/lib/WalletMultiButton.js 61:6-15

export 'useWallet' (imported as 'useWallet') was not found in '@solana/wallet-adapter-react' (module has no exports)

ERROR in ./node_modules/@solana/wallet-adapter-base/lib/index.js 1:0-26

Module not found: Error: Can't resolve './adapter' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-base/lib'
Did you mean 'adapter.js'?
BREAKING CHANGE: The request './adapter' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-base/lib/index.js 2:0-25

Module not found: Error: Can't resolve './errors' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-base/lib'
Did you mean 'errors.js'?
BREAKING CHANGE: The request './errors' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-base/lib/index.js 3:0-25

Module not found: Error: Can't resolve './signer' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-base/lib'
Did you mean 'signer.js'?
BREAKING CHANGE: The request './signer' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-base/lib/index.js 4:0-25

Module not found: Error: Can't resolve './wallet' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-base/lib'
Did you mean 'wallet.js'?
BREAKING CHANGE: The request './wallet' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-bitkeep/lib/index.js 1:0-26

Module not found: Error: Can't resolve './adapter' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-bitkeep/lib'
Did you mean 'adapter.js'?
BREAKING CHANGE: The request './adapter' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-bitkeep/lib/index.js 2:0-25

Module not found: Error: Can't resolve './wallet' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-bitkeep/lib'
Did you mean 'wallet.js'?
BREAKING CHANGE: The request './wallet' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-bitpie/lib/index.js 1:0-26

Module not found: Error: Can't resolve './adapter' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-bitpie/lib'
Did you mean 'adapter.js'?
BREAKING CHANGE: The request './adapter' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-bitpie/lib/index.js 2:0-25

Module not found: Error: Can't resolve './wallet' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-bitpie/lib'
Did you mean 'wallet.js'?
BREAKING CHANGE: The request './wallet' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-blocto/lib/index.js 1:0-26

Module not found: Error: Can't resolve './adapter' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-blocto/lib'
Did you mean 'adapter.js'?
BREAKING CHANGE: The request './adapter' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-blocto/lib/index.js 2:0-25

Module not found: Error: Can't resolve './wallet' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-blocto/lib'
Did you mean 'wallet.js'?
BREAKING CHANGE: The request './wallet' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-clover/lib/index.js 1:0-26

Module not found: Error: Can't resolve './adapter' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-clover/lib'
Did you mean 'adapter.js'?
BREAKING CHANGE: The request './adapter' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-clover/lib/index.js 2:0-25

Module not found: Error: Can't resolve './wallet' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-clover/lib'
Did you mean 'wallet.js'?
BREAKING CHANGE: The request './wallet' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-coinhub/lib/index.js 1:0-26

Module not found: Error: Can't resolve './adapter' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-coinhub/lib'
Did you mean 'adapter.js'?
BREAKING CHANGE: The request './adapter' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-coinhub/lib/index.js 2:0-25

Module not found: Error: Can't resolve './wallet' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-coinhub/lib'
Did you mean 'wallet.js'?
BREAKING CHANGE: The request './wallet' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-coin98/lib/index.js 1:0-26

Module not found: Error: Can't resolve './adapter' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-coin98/lib'
Did you mean 'adapter.js'?
BREAKING CHANGE: The request './adapter' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-coin98/lib/index.js 2:0-25

Module not found: Error: Can't resolve './wallet' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-coin98/lib'
Did you mean 'wallet.js'?
BREAKING CHANGE: The request './wallet' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-ledger/lib/index.js 1:0-26

Module not found: Error: Can't resolve './adapter' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-ledger/lib'
Did you mean 'adapter.js'?
BREAKING CHANGE: The request './adapter' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-ledger/lib/index.js 2:0-43

Module not found: Error: Can't resolve './util' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-ledger/lib'
Did you mean 'util.js'?
BREAKING CHANGE: The request './util' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-ledger/lib/index.js 3:0-25

Module not found: Error: Can't resolve './wallet' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-ledger/lib'
Did you mean 'wallet.js'?
BREAKING CHANGE: The request './wallet' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-mathwallet/lib/index.js 1:0-26

Module not found: Error: Can't resolve './adapter' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-mathwallet/lib'
Did you mean 'adapter.js'?
BREAKING CHANGE: The request './adapter' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-mathwallet/lib/index.js 2:0-25

Module not found: Error: Can't resolve './wallet' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-mathwallet/lib'
Did you mean 'wallet.js'?
BREAKING CHANGE: The request './wallet' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-phantom/lib/index.js 1:0-26

Module not found: Error: Can't resolve './adapter' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-phantom/lib'
Did you mean 'adapter.js'?
BREAKING CHANGE: The request './adapter' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-phantom/lib/index.js 2:0-25

Module not found: Error: Can't resolve './wallet' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-phantom/lib'
Did you mean 'wallet.js'?
BREAKING CHANGE: The request './wallet' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-react/lib/index.js 1:0-37

Module not found: Error: Can't resolve './ConnectionProvider' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-react/lib'
Did you mean 'ConnectionProvider.js'?
BREAKING CHANGE: The request './ConnectionProvider' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-react/lib/index.js 2:0-25

Module not found: Error: Can't resolve './errors' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-react/lib'
Did you mean 'errors.js'?
BREAKING CHANGE: The request './errors' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-react/lib/index.js 3:0-34

Module not found: Error: Can't resolve './useAnchorWallet' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-react/lib'
Did you mean 'useAnchorWallet.js'?
BREAKING CHANGE: The request './useAnchorWallet' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-react/lib/index.js 4:0-32

Module not found: Error: Can't resolve './useConnection' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-react/lib'
Did you mean 'useConnection.js'?
BREAKING CHANGE: The request './useConnection' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-react/lib/index.js 5:0-34

Module not found: Error: Can't resolve './useLocalStorage' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-react/lib'
Did you mean 'useLocalStorage.js'?
BREAKING CHANGE: The request './useLocalStorage' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-react/lib/index.js 6:0-28

Module not found: Error: Can't resolve './useWallet' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-react/lib'
Did you mean 'useWallet.js'?
BREAKING CHANGE: The request './useWallet' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-react/lib/index.js 7:0-33

Module not found: Error: Can't resolve './WalletProvider' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-react/lib'
Did you mean 'WalletProvider.js'?
BREAKING CHANGE: The request './WalletProvider' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-safepal/lib/index.js 1:0-26

Module not found: Error: Can't resolve './adapter' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-safepal/lib'
Did you mean 'adapter.js'?
BREAKING CHANGE: The request './adapter' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-safepal/lib/index.js 2:0-25

Module not found: Error: Can't resolve './wallet' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-safepal/lib'
Did you mean 'wallet.js'?
BREAKING CHANGE: The request './wallet' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-slope/lib/index.js 1:0-26

Module not found: Error: Can't resolve './adapter' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-slope/lib'
Did you mean 'adapter.js'?
BREAKING CHANGE: The request './adapter' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-slope/lib/index.js 2:0-25

Module not found: Error: Can't resolve './wallet' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-slope/lib'
Did you mean 'wallet.js'?
BREAKING CHANGE: The request './wallet' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-solflare/lib/index.js 1:0-26

Module not found: Error: Can't resolve './adapter' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-solflare/lib'
Did you mean 'adapter.js'?
BREAKING CHANGE: The request './adapter' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-solflare/lib/index.js 2:0-25

Module not found: Error: Can't resolve './wallet' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-solflare/lib'
Did you mean 'wallet.js'?
BREAKING CHANGE: The request './wallet' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-sollet/lib/index.js 1:0-26

Module not found: Error: Can't resolve './adapter' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-sollet/lib'
Did you mean 'adapter.js'?
BREAKING CHANGE: The request './adapter' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-sollet/lib/index.js 2:0-25

Module not found: Error: Can't resolve './wallet' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-sollet/lib'
Did you mean 'wallet.js'?
BREAKING CHANGE: The request './wallet' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-solong/lib/index.js 1:0-26

Module not found: Error: Can't resolve './adapter' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-solong/lib'
Did you mean 'adapter.js'?
BREAKING CHANGE: The request './adapter' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-solong/lib/index.js 2:0-25

Module not found: Error: Can't resolve './wallet' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-solong/lib'
Did you mean 'wallet.js'?
BREAKING CHANGE: The request './wallet' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-tokenpocket/lib/index.js 1:0-26

Module not found: Error: Can't resolve './adapter' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-tokenpocket/lib'
Did you mean 'adapter.js'?
BREAKING CHANGE: The request './adapter' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-tokenpocket/lib/index.js 2:0-25

Module not found: Error: Can't resolve './wallet' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-tokenpocket/lib'
Did you mean 'wallet.js'?
BREAKING CHANGE: The request './wallet' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-torus/lib/index.js 1:0-26

Module not found: Error: Can't resolve './adapter' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-torus/lib'
Did you mean 'adapter.js'?
BREAKING CHANGE: The request './adapter' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./node_modules/@solana/wallet-adapter-torus/lib/index.js 2:0-25

Module not found: Error: Can't resolve './wallet' in '/Users/admin/Workspace/my-app/frontend/node_modules/@solana/wallet-adapter-torus/lib'
Did you mean 'wallet.js'?
BREAKING CHANGE: The request './wallet' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

My package.json

"@solana/wallet-adapter-base": "^0.8.1",
"@solana/wallet-adapter-react": "^0.14.1",
"@solana/wallet-adapter-react-ui": "^0.7.0",
"@solana/wallet-adapter-wallets": "^0.13.0",
"@solana/web3.js": "^1.31.0",
"react": "^17.0.2",
"react-app-rewired": "^2.1.9",
"react-dom": "^17.0.2",

My config-overrides.js file

const webpack = require("webpack");

module.exports = function override(config, env) {
  // Do stuff with the webpack config...
  if (!config.plugins) {
    config.plugins = [];
  }
  config.plugins.push(
    new webpack.ProvidePlugin({
      Buffer: ["buffer", "Buffer"],
    }),
    new webpack.ProvidePlugin({
      process: "process/browser",
    })
  );

  config.resolve = {
    ...config.resolve,
    fallback: {
      stream: require.resolve("stream-browserify"),
      crypto: require.resolve("crypto-browserify"),
      assert: require.resolve("assert/"),
      http: require.resolve("stream-http"),
      https: require.resolve("https-browserify"),
      os: require.resolve("os-browserify/browser"),
      url: require.resolve("url/"),
    },
  };
  return config;
};

My wallet connect file code.

import React, { useMemo } from "react";
import {
  ConnectionProvider,
  WalletProvider,
} from "@solana/wallet-adapter-react";
import { WalletAdapterNetwork } from "@solana/wallet-adapter-base";
import {
  LedgerWalletAdapter,
  PhantomWalletAdapter,
  SlopeWalletAdapter,
  SolflareWalletAdapter,
  // SolletExtensionWalletAdapter,
  SolletWalletAdapter,
  TorusWalletAdapter,
} from "@solana/wallet-adapter-wallets";
import {
  WalletModalProvider,
  WalletDisconnectButton,
  WalletMultiButton,
} from "@solana/wallet-adapter-react-ui";
import { clusterApiUrl } from "@solana/web3.js";

// Default styles that can be overridden by your app
// require("@solana/wallet-adapter-react-ui/styles.css");

export const SolanaW = () => {
  const network = WalletAdapterNetwork.Devnet;

  const endpoint = useMemo(() => clusterApiUrl(network), [network]);

  const wallets = useMemo(
    () => [
      new PhantomWalletAdapter(),
      new SlopeWalletAdapter(),
      new SolflareWalletAdapter(),
      new TorusWalletAdapter(),
      new LedgerWalletAdapter(),
      new SolletWalletAdapter({ network }),
      // new SolletExtensionWalletAdapter({ network }),
    ],
    [network]
  );

  return (
    <ConnectionProvider endpoint={endpoint}>
      <WalletProvider wallets={wallets} autoConnect>
        <WalletModalProvider>
          <WalletMultiButton />
          <WalletDisconnectButton />
        </WalletModalProvider>
      </WalletProvider>
    </ConnectionProvider>
  );
};
Screenshot 2021-12-28 at 9 55 09 PM
kevin-dev71 commented 2 years ago

same error here

jordaaash commented 2 years ago

Can you provide a link to your repo, or if not, at least your full package.json?

jordaaash commented 2 years ago

It looks like what's happening is that your Webpack config isn't handling / transpiling the @solana/wallet-adapter-* ESM modules. I don't know what the root cause is though, because I can't test out the code.

jordaaash commented 2 years ago

https://stackoverflow.com/questions/54043498/how-to-transpile-node-modules-modules-with-babel-loader and https://developer.epages.com/blog/coding/how-to-transpile-node-modules-with-babel-and-webpack-in-a-monorepo/ may be of help. By default, Webpack probably doesn't pass dependencies in node_modules through a transpiling loader (usually Babel). You need to configure it to do so.

kevin-dev71 commented 2 years ago

my problem is with nextjs v12 ... look like need to add those modules to next.config... im figuring how to do it

kevin-dev71 commented 2 years ago

fixed... i followed this solution https://github.com/solana-labs/wallet-adapter/blob/master/packages/starter/nextjs-starter/next.config.js

keval6706 commented 2 years ago

Hello @jordansexton

Please refer this link: https://codesandbox.io/s/nostalgic-euclid-1etnh?file=/src/App.js

In sandbox i can open modal but with no image and undefined label.

Screenshot 2021-12-29 at 8 20 33 PM
wakechromium commented 2 years ago

I'm getting the same error, I'm using antdesign with craco.

wakechromium commented 2 years ago

@keval6706 somehow this error is because of react-scripts version 5.0.0, I installed 4.0.3 its works fine.

keval6706 commented 2 years ago

@tayab2468 i have checked with "react-scripts": "4.0.3" but issue is same.

please share codesandbox if possible.

broskicodes commented 2 years ago

Hello @jordansexton

Please refer this link: https://codesandbox.io/s/nostalgic-euclid-1etnh?file=/src/App.js

In sandbox i can open modal but with no image and undefined label.

Screenshot 2021-12-29 at 8 20 33 PM

I'm getting this same issue using "react-scripts": "4.0.3". No icons load and no functionality. Any fixes?

jordaaash commented 2 years ago

Please refer this link: https://codesandbox.io/s/nostalgic-euclid-1etnh?file=/src/App.js

Thanks for providing this. I took a look. What's happening is that the example code in the readme is out of date with the published versions of the packages. It should work when I publish a few of them, working on it now.

jordaaash commented 2 years ago

Just published:

jordaaash commented 2 years ago

Also worth noting -- configuration for transpiling the modules is no longer required. See https://github.com/solana-labs/wallet-adapter/blob/master/packages/starter/nextjs-starter/next.config.js which has these removed now.

ESM and CJS versions of all relevant (non-starter) packages are included in the published versions now!

keval6706 commented 2 years ago

Thanks @jordansexton It's working after upgrade packages :)

systemis commented 2 years ago

Thanks @jordansexton It's working after upgrade packages :)

Can you share me full package after you upgraded because it didn't fix for me

jordaaash commented 2 years ago

@systemis please check out https://github.com/solana-labs/wallet-adapter/tree/master/packages/starter/nextjs-starter to see if your project configuration matches what's in here. If you can't fix the issue, please open a new issue with a link to your repository that reproduces the issue.

Findiglay commented 2 years ago

Have same issue with react-scripts

the-fool commented 2 years ago

I too am having the exact same issue with the upgraded packages and React-Scripts @ 5.0.0.

jordaaash commented 2 years ago

@systemis @Findiglay @the-fool please try this: https://github.com/solana-labs/wallet-adapter/issues/236#issuecomment-1004071552

Also please check the config in https://github.com/solana-labs/wallet-adapter/tree/master/packages/starter/react-ui-starter which uses CRA.

As noted in https://github.com/solana-labs/wallet-adapter/issues/236, there's an issue with CRA 5. Upgrading to package versions that aren't supported isn't recommended.

If you've done all these things and still have an issue, please open a new issue with a reproduction of your problem. Multiple users commenting with possibly different, unrelated issues inside of an already closed issue is difficult to manage. Thanks!

sparkydasrath commented 2 years ago

@jordansexton I literally ran into this issue (new to using this btw) and after some googling, came across this post. I was just following this tutorial and kept getting the useWallet error

I fixed my issue 2 fold in package.json

  1. changed react-scripts: 4.0.3 (was at 5.0.0)
  2. Updated whatever was in here with
    "browserslist": {
    "production": [
      "defaults"
    ],
    "development": [
      "defaults"
    ]
    }

    After that I was able to do npm run start on the sample and it fired up the app in firefox. Hope this helps anyone running into the same issue.

jordaaash commented 2 years ago

Glad you figured it out, thanks for posting the solution!

Findiglay commented 2 years ago

@jordansexton can confirm that browserlists fix works with react-scripts v4.0.3 but not with v5.0.0

jordaaash commented 2 years ago

@Findiglay see https://github.com/solana-labs/wallet-adapter/issues/241#issuecomment-1006239019, CRA 5 support is blocked until Craco supports it.