EatTheBlocks Forum

15. Poll Uniswap Prices

When I run the code after following this portion of the tutorial I get the following error message. Can someone help? Previously, I would also get an error say that fetchData is not a function - odd?

It’s easier a typo in your code (Token not defined), or you are using Uniswap sdk v3 instead of v2. If thats the case, uninstall uniswap and re-install it with the correct version:

npm uninstall @uniswap/sdk
npm install @uniswap/sdk@2.0.6

Thank you very much! The issue was the uniswap version, and that fixed it.

1 Like