Open Jack-Works opened 2 years ago
Hey @Jack-Works - thanks for reporting this! I've marked it down as an enhancement; we'd take a look if you wanted to submit a PR upgrading it!
It looks like package regenerator-runtime
is installed via package tsdx
. Both regenerator-runtime@0.13.11 and tsdx@0.14.1 are latest versions. I wonder if I'm missing something..
% npm ls regenerator-runtime
@uniswap/sdk-core@3.2.6 /Users/hirotashiro/Uniswap/sdk-core
└─┬ tsdx@0.14.1
├─┬ babel-plugin-macros@2.8.0
│ └─┬ @babel/runtime@7.22.5
│ └── regenerator-runtime@0.13.11 deduped
└── regenerator-runtime@0.13.11
% cd ../v3-sdk
% npm ls regenerator-runtime
@uniswap/v3-sdk@3.9.0 /Users/hirotashiro/Uniswap/v3-sdk
└─┬ tsdx@0.14.1
├─┬ babel-plugin-macros@2.8.0
│ └─┬ @babel/runtime@7.22.5
│ └── regenerator-runtime@0.13.11 deduped
└── regenerator-runtime@0.13.11
I took a look, and it is still using the old version. (New version should use define
, not =
). Maybe there is something wrong with the build step
node_modules/regenerator-runtime/runtime.js
has the correct version in my environment.
It could be something to do with npm as you said. Deleting node_modules folder and running npm install
might help? https://stackoverflow.com/questions/11351784/how-do-i-do-a-clean-install-delete-node-modules-and-install-with-npm
Note: this is not related to the cache. The published version of @uniswap/v3-sdk has that code.
https://cdn.jsdelivr.net/npm/@uniswap/v3-sdk@3.9.0/dist/v3-sdk.esm.js
search gp[iteratorsymbol]
and you can see it.
Good catch!
Hi! I found the built version of this project contains an old version of regenerator-runtime (https://github.com/facebook/regenerator/) which throws an error in our environment.
Please upgrade to the latest version of regenerator runtime, thanks!
The new code in the regenerator runtime: