Open anandb7248 opened 4 years ago
I ran into the same issue @anandb7248 thanks for writing.
I've updated my react and react-dom versions, however now it seems that none of the CSS is loading.
No error messages in the console.
package.json `{ "name": "gatsby-starter-default",
"description": "Gatsby default starter", "version": "1.0.0", "author": "Kyle Mathews mathews.kyle@gmail.com", "dependencies": { "gatsby": "^2.21.13", "gatsby-plugin-react-helmet": "^2.0.11", "react": "^16.13.1", "react-dom": "^16.13.1", "react-helmet": "^5.2.1", "styled-components": "^5.1.0" }, "keywords": [ "gatsby" ], "license": "MIT", "scripts": { "build": "gatsby build", "develop": "gatsby develop", "format": "prettier --write 'src/*/.js'", "test": "echo \"Error: no test specified\" && exit 1" }, "devDependencies": { "prettier": "^1.19.1" }, "repository": { "type": "git", "url": "" } }`
@buildontherock Hey, were you able to resolve your issue?
That's strange why you don't see any CSS. And it may be hard to resolve your issue without looking into more of the files.
@anandb7248 thanks for your response. I did find the solution.
Anyone experiencing a similar issue should follow the complete migration guidelines found in the Gatsby documentation, specifically[(https://www.gatsbyjs.org/docs/migrating-from-v1-to-v2/#handling-breaking-changes)
The migration from Gatsby v1-v2 is quite involved.
@buildontherock Good stuff man!!
I followed Gatsby's migration guideline, but my CSS still won't load. Besides, I am not seeing the API data no matter how I change my code. As a paid member I hope to see Meng's team update the tutorial with gatsby 2.0 to solve the problem.
I wish I knew this before I paid for the course, the worst kind of paid tutorial is the one that the creator doesnt keep up to date.
If anyone is still facing issues with this, I would advise to not migrate from V1 to V2. Instead directly starting working on V3, or whatever the latest version of Gatsby is. Just move out the contents of the layout folder to src/components as layout.css and layout.js. Also, instead of "LayoutQuery" for graphql, use "staticquery from gatsby". You should not have any issues running it post the same.
Latest react and react-dom versions is "16.13.1".
If a Design+Code student were to follow the React for Designers with the start my-react-app, they will run into an issue when following Styled Components with error similar to the following issue: https://github.com/styled-components/styled-components/issues/2517