coinbase / onchainkit

React components and TypeScript utilities to help you build top-tier onchain apps.
https://onchainkit.xyz
MIT License
511 stars 114 forks source link

Bug: TypeScript Error in Frames 101 Example #975

Closed RobertDoc closed 1 month ago

RobertDoc commented 1 month ago

Describe the bug and the steps to reproduce it

  1. Fork https://github.com/Zizzamia/a-frame-in-100-lines
  2. Update OnchainKit to 0.27.0 in package.json.
  3. TS error in page.tsx:

TS1479: The current file is a CommonJS module whose imports will produce require calls; however, the referenced file is an ECMAScript module and cannot be imported with require. Consider writing a dynamic import(@coinbase/onchainkit/frame)' call instead.

What's the expected behavior?

No TS error.

What version of the libraries are you using?

Zizzamia commented 1 month ago

Try the latest https://github.com/Zizzamia/a-frame-in-100-lines, it should be fixed now.

And thank you again for taking the time to report this.

Bartletti commented 1 month ago

@wawrzy17

Zizzamia commented 1 month ago

Closing this, as it seems resolved.