Closed julioolvr closed 5 years ago
Oops! Sorry about that 😅. It should be fixed under v2.2.2
. Please feel free to reopen if there are any further issues. Thanks for filing an issue! 🙏
I am facing the same issue that @julioolvr posted last time. I follow your solution and down-grade react-measure version to 2.2.1 but it still give me same error.
Hmm weird 🤔 this should be fixed in the latest version. @ahmedsharif does this error occur with v2.2.2
installed?
Yes. I tried these versions v2.2.2 v2.2.1 and v2.2.3. Can you kindly help me regarding this issue?
@ahmedsharif I just got back from vacation so I have some things to catch up on, but I will look into this as soon as I get a chance. Please feel free to submit a PR if you come across a solution. I might try updating @babel/runtime
to see if that helps anything.
In a project with Babel 6 and Webpack 3, trying to use
react-measure
throws several errors like:dist/index.esm.js
does try to import stuff from@babel/runtime
but that seems to be a transitive dev dependency of the project, so I'd expect it not to be referenced by build artifacts. That being said I could be wrong - I'm not sure what are common expectations, but it feels that if Babel 7 were required to use the project then@babel
shouldn't be a dev dependency.For the time being, I'm still testing this out but
npm add @babel/runtime
seems to be working and is playing well with having Babel 6 in the same project so far.