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 and use polyfill #4742

Merged
merged 6 commits into from
Apr 18, 2018
Merged

upgrade and use polyfill #4742

merged 6 commits into from
Apr 18, 2018

Conversation

jquense
Copy link
Contributor

@jquense jquense commented Mar 28, 2018

I am slightly unsure if the component-renderer logic is the same…

@ghost ghost assigned jquense Mar 28, 2018
@ghost ghost added the review label Mar 28, 2018
@KyleAMathews
Copy link
Contributor

Nice! Fixes #4692 :-)

Will review and merge as soon as I get some dev time... :-|

@KyleAMathews KyleAMathews added this to To Do in Gatsby v2 Release via automation Apr 10, 2018
@KyleAMathews KyleAMathews moved this from To Do to In progress in Gatsby v2 Release Apr 10, 2018
@m-allanson
Copy link
Contributor

m-allanson commented Apr 12, 2018

I've added a commit bumping react-lifecycles-compat to v3. However I can't get this branch to run on a hello world test site...

Running gatsby develop gives me the following error in the browser console, once each for GatsbyLink and ComponentRenderer:

Warning: Unsafe legacy lifecycles will not be called for components using new component APIs.

ComponentRenderer uses getDerivedStateFromProps() but also contains the following legacy lifecycles:
  componentWillMount
  componentWillReceiveProps

The above lifecycles should be removed. Learn more about this warning here:
https://fb.me/react-async-component-lifecycle-hooks

Those lifecycle methods don't exist in the Gatsby source, so I guess the components are being extended somewhere? Can we ignore those warnings?

Clicking a <Link> element triggers an Uncaught DOMException: Failed to execute 'pushState' on 'History': History object could not be cloned. error.

gatsby build errors out with:

error Building static HTML for pages failed

See our docs page on debugging HTML builds for help https://goo.gl/yL9lND

  3 |   if (!isObject(it)) throw TypeError(it + ' is not an object!');
  4 |   return it;
> 5 | };
    | ^
  6 |
  7 |
  8 |


  WebpackError: Cannot read property 'layout' of undefined

  - _an-object.js:5 getLayout
    node_modules/core-js/library/modules/_an-object.js:5:1










error An unexpected error occurred: "Command failed.

@pieh
Copy link
Contributor

pieh commented Apr 12, 2018

for gatsby-link stuff - try updating it - I had same error earlier and I think I fixed it with #4805

@m-allanson
Copy link
Contributor

Aha, thanks @pieh! I pulled that change in via GitHub in dacfe28, but haven't run it locally yet.

@jquense
Copy link
Contributor Author

jquense commented Apr 12, 2018

The lifecycle warning message, i think, is coming from react hot loader which is proxying the components

@m-allanson m-allanson removed the review label Apr 13, 2018
@m-allanson
Copy link
Contributor

m-allanson commented Apr 18, 2018

The lifecycle warning message, i think, is coming from react hot loader which is proxying the components

That makes sense, thanks. I guess we can ignore that for now?

I am slightly unsure if the component-renderer logic is the same…

Me neither... I think it's the same? Things looked good on a test site.

I pushed a couple of commits to gatsby-link, previously gatsby build was failing as it couldn't find history. if those look OK then I think this is good to merge.

@m-allanson
Copy link
Contributor

m-allanson commented Apr 18, 2018

A new version of react-hot-loader that adds React v16.3 compatibility was released a couple of hours ago :) PR updated.

@jquense
Copy link
Contributor Author

jquense commented Apr 18, 2018

ya!

Copy link
Contributor

@m-allanson m-allanson left a comment

Choose a reason for hiding this comment

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

👍

@jquense jquense merged commit dc74bc1 into v2 Apr 18, 2018
Gatsby v2 Release automation moved this from In progress to Done Apr 18, 2018
@jquense jquense deleted the deprecated-lifecycles branch April 18, 2018 14:55
@nihgwu
Copy link
Contributor

nihgwu commented Apr 18, 2018

can we release a new version for v2? alpha-13 breaks a lot of things:

  1. mini-css plugin version mismatch (fixed)
  2. the new json-store seems not compatible with redirects, I always get erorr caused by dev-404-page not found, I changed the source code to workaround, but still get errors for getLayout when deploying
  3. I also get a strange regression the Type defined in my custom transformer plugin not find in RootQueryType which is not happening in alpha-12, I manage to solve that by moving the plugin to the very top of the config, the custom transformer plugin runs after scheme update, have no idea why

so I'm still staying with alpha-12, but that version has a bug with pathPrefix when building, I know that's not the right place to post those things, but I'd like to try the latest version to see if they still there

@KyleAMathews
Copy link
Contributor

Probably going to release another alpha once my layout removal PR is done #4887

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

5 participants