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

Migrate Project to latest Gatsby release #334

Open
yjose opened this issue Jun 3, 2022 · 7 comments
Open

Migrate Project to latest Gatsby release #334

yjose opened this issue Jun 3, 2022 · 7 comments
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@yjose
Copy link
Member

yjose commented Jun 3, 2022

Right now the project is using Gatsby v2 and we want to upgrade it to latest version

@yjose yjose added good first issue Good for newcomers help wanted Extra attention is needed labels Jun 3, 2022
@azihassan
Copy link
Contributor

Interested in this. Do you have an anti regression strategy ?

@yjose
Copy link
Member Author

yjose commented Jul 23, 2022

Unfortunately no. will make sure to test the new implementation manually when every you have the chance to open a new PR
Good luck and let me know if you need my help on something

@azihassan
Copy link
Contributor

Thanks, I'll look into it. But just a heads up :

I tried to upgrade just now, and it looks like some packages need to be upgraded too.

For example, node-sass 4.13.0 didn't support node v16. Following this, I downgraded my node install to v13 (nvm is a lifesaver here). But then I ran into

error babel-jest@27.4.5: The engine "node" is incompatible with this module. Expected version "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0". Got "13.3.0"

I downgraded it further to v12 and got :

error babel-preset-gatsby@2.4.0: The engine "node" is incompatible with this module. Expected version ">=14.15.0". Got "12.22.12"

So it looks like breaking changes might be inevitable.

@yjose
Copy link
Member Author

yjose commented Jul 23, 2022

Yeah please try to updates all deps to latest versions

@azihassan
Copy link
Contributor

I briefly tested the deployed version and it looks OK

Just to be safe, I recommend that we try to deploy an episode using the upgraded code

@azihassan
Copy link
Contributor

Quick update : still working on this. The gatsby-plugin-mdx 4.0.0 upgrade brought a bunch of breaking changes that I'm still trying to wrap my head around. The main problem I have is that it doesn't recognize frontmatter :

 ERROR #85901  GRAPHQL

There was an error in your GraphQL query:

Field "frontmatter" is not defined by type "MdxFilterInput".

File: gatsby-node.js:73:24



  GraphQLError: Field "frontmatter" is not defined by type "MdxFilterInput".

Right now gatsby-plugin-mdx is still in RC, but I remember reading that a stable version will be released this week. I'll look into it again once the stable version is out.

@azihassan
Copy link
Contributor

Update : I tested the stable version a few days ago. The frontmatter error disappeared, but it doesn't recognize certain fields :

image

Commenting out the unrecognised fields causes the query to display the correct results.

Right now I'm still looking into why it fails for some fields and not others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants