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

[Upgrade to Next 12] - WIP #45

Closed
4 tasks done
payapula opened this issue Nov 21, 2021 · 3 comments · Fixed by #46
Closed
4 tasks done

[Upgrade to Next 12] - WIP #45

payapula opened this issue Nov 21, 2021 · 3 comments · Fixed by #46

Comments

@payapula
Copy link
Owner

payapula commented Nov 21, 2021

Description

To update repo to use latest version of nextJS.

There is branch WIP - feature/update_next_and_its_deps

It has the latest version of the following libraries

  • chakra
  • next
  • next-seo
  • next-mdx-remote

image

Issues

  1. Faced an issue with node version, as next bumped the minimum required node version from 12.0 to 12.22

Solution: Use bash terminal which has the latest node version, v14.7.5

Nvm is installed in bash terminal
If nvm common not found in bash then troubleshoot - https://github.com/nvm-sh/nvm#troubleshooting-on-linux
bash: source ~/.bashrc
Then bash should by default have node version 14x
node —version
v14.7.5

  1. Unable to start the server. React is not defined

image

This is because next now uses SWC compiler instead of babel. Chakra uses emotion which has a dependency on babel plugin.

The porting of this babel plugin into SWC is in progress - Port @emotion/babel-plugin to SWC. Hence, waiting for it to complete the next update.

The issue was because of JSX pragma being used to style some of the elements in the components. As a workaround, those css props were removed and replaced with chakra props 😄.

This is no longer a blocker.

Progress Overview

  • Update chakra
  • Update next and all related deps
  • Fix node issue
  • Fix React not defined issue
@payapula payapula pinned this issue Nov 21, 2021
@payapula
Copy link
Owner Author

Faced one more issue, because of chakra upgrade from 1.3 to 1.7. chakra-ui/chakra-ui#4226 (comment).

For a workaround, I have removed the ThemeOverride type for overrides - commit

@ghost

This comment has been minimized.

@payapula
Copy link
Owner Author

Hi @ruansenadev

I am not quite sure what is the issue you are facing. I am guessing it's related to the type of theme we are passing to extendTheme function and tsconfig.

I didn't face any issue with chara-ui theme being displayed when I write code. If you give an example I will check if it's happening for me or not.

Thank you.

@payapula payapula unpinned this issue Aug 3, 2022
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 a pull request may close this issue.

1 participant