web3-react icon indicating copy to clipboard operation
web3-react copied to clipboard

Can't resolve '@web3-react/core' in '/my_path/src'

Open equalogix opened this issue 5 years ago • 1 comments

I'm trying to start my app with NPM start, but it cause this message: Module not found: Can't resolve '@web3-react/core' in '/my_path/src' Why is it looking for web3-react/core in 'src' it should be looking in node_modules

Steps to reproduce:

  1. Installed with NPM
  2. npm start

I noticed that in the docs it only shows installation via yarn. Is this the issue? What would be required to make this installable with NPM, and why is available to install via NPM if the installation doesn't ultimately work?

Installation is on Ubuntu 20-04, node v14.16.0

equalogix avatar Apr 23 '21 20:04 equalogix

The issue is with the documentation. The instruction provided in the link below led me to the error. https://github.com/NoahZinsmeister/web3-react/tree/v6/docs where it shows: import { Web3ReactProvider } from '@web3-react/core'

The more correct documentation on the npmjs webpage, here: https://www.npmjs.com/package/web3-react shows the import instructions like this, which worked for me. import Web3Provider from 'web3-react'

I say more correct because it still shows installation commands using yarn (despite it being the npm web page).

equalogix avatar Apr 24 '21 03:04 equalogix