Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update and typescript version #499

Merged
merged 2 commits into from
Aug 28, 2023
Merged

Update and typescript version #499

merged 2 commits into from
Aug 28, 2023

Conversation

technophile-04
Copy link
Collaborator

@technophile-04 technophile-04 commented Aug 22, 2023

Description

So after a lot of digging, I landed on how to two versions of same npm package and for some reason, I am not able to find that particular link but people were trying to have kind of same typescript version. Which led to me thinking that the reason yarn next:check-types might be checking node_modules as discussed in #492 is because viem is using typescript version 5+

So the steps I followed to fix #492 :

  1. Updated viem version to latest using yarn workspace @se-2/nextjs up viem

  2. I did yarn next:check-types here I got 678 errors mostly from node_modules/viem

  3. yarn workspace @se-2/nextjs up typescript (For some reason this also updated hardhat typescript version which is ok I think nd kind of makes sense)

  4. Again yarn next:check-types it now gave me only errors from Se-2 repo regarding AddressType

  5. Updated abi.d.ts, to also handle viem/node_modules/abitype and have AddressType : string

  6. Again yarn next:check-types and lol no types error at all!!


Started with manual testing and found that nextjs app broke with "Cannot find fs module error", after some digging found this on Rainbowkit installation Page :

Screenshot 2023-08-23 at 2 27 42 AM

So I added nextjs config which they linked on their installation Page and everything started working. I don't why we didn't have to do it before.

My wild guess is something heavily changed inside viem which kind of removed exposing ethers to outter world and we got that error because viem is internally using ethers somewhere, check its dependencies here.


Lol I didn't particularly know what was actual cause, so explained all the steps if someone can infer something from it 🙌.

I need to do some testing nicely, will do it tomorrow and would appreciate it if others could test as well 🙌

Also please feel free to share your thoughts !!

Additional Information

Related Issues

#492

Your ENS/address: shivbhonde.eth

Copy link
Collaborator

@damianmarti damianmarti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but I think it is better that @sverps looks at it before merging.

Copy link
Collaborator

@dgrcode dgrcode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Collaborator

@sverps sverps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this solves the issues, we can merge this for now. I'll have a second look to see if there's an alternative, but no need to wait for that.

@damianmarti damianmarti merged commit 3f7bd28 into main Aug 28, 2023
1 check passed
@damianmarti damianmarti deleted the update/viem-version branch August 28, 2023 12:39
damianmarti pushed a commit that referenced this pull request Sep 7, 2023
* Fix RainbowKitCustomConnectButton dropdown styles (#500)

* chore: footer missalignment & home page on small screens  (#502)

Co-authored-by: CJ <53488449+0xChijoke@users.noreply.github.com>

* Update and typescript version (#499)

* update typescript and viem version

* update next config

* fix: header links wrapping icons and text (#510)

* Fix typos in useScaffoldContractWrite logs (#512)

* fix: spelling in test file name (#522)

* add suport for verify in foundry similar to hardhat

* update git task title when using foundry

* add changeset

* update changeset

---------

Co-authored-by: Rinat <rinat@hey.com>
Co-authored-by: CJ <53488449+0xChijoke@users.noreply.github.com>
Co-authored-by: Zak G <zakgriffith@gmail.com>
@github-actions github-actions bot mentioned this pull request Sep 7, 2023
@rin-st rin-st mentioned this pull request Sep 24, 2023
@github-actions github-actions bot mentioned this pull request Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handling wagmi & viem vesions
5 participants