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.
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 pathnear-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:
@near-wallet-selector/core
version: "^8.9.13"near-api-js
version: "^5.0.0"