near / wallet-selector

This is a wallet selector modal that allows users to interact with NEAR dApps with a selection of available wallets.
https://near.github.io/wallet-selector/
Apache License 2.0
149 stars 155 forks source link

Module not found: Error resolving 'near-api-js/lib/providers/index' in @near-wallet-selector/core #1207

Open HoussineAgha opened 2 months ago

HoussineAgha commented 2 months ago

Issue Description:

I'm encountering an error when using the @near-wallet-selector/core package and near-api-js in my React project. The error message indicates that the module cannot resolve the path near-api-js/lib/providers/index in the @near-wallet-selector/core package.

Error Message: ERROR in ./node_modules/@near-wallet-selector/core/index.js 3:0-66 Module not found: Error: Can't resolve 'near-api-js/lib/providers/index' in 'C:\Users\Altabba\Desktop\gamfi-react\node_modules\@near-wallet-selector\core' Did you mean 'index.js'? BREAKING CHANGE: The request 'near-api-js/lib/providers/index' 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.

Additional Information: