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

[v2] Update examples in v2 branch #5598

Closed
camsjams opened this issue May 30, 2018 · 12 comments
Closed

[v2] Update examples in v2 branch #5598

camsjams opened this issue May 30, 2018 · 12 comments

Comments

@camsjams
Copy link
Contributor

@camsjams camsjams commented May 30, 2018

Summary

Some of the examples in the v2 branch https://github.com/gatsbyjs/gatsby/tree/v2/examples

Have package.json versions pointed at latest instead of next - is this intentional?

Examples include:
https://github.com/gatsbyjs/gatsby/blob/v2/examples/using-styled-components/package.json
https://github.com/gatsbyjs/gatsby/blob/v2/examples/using-redux/package.json

@m-allanson

This comment has been minimized.

Copy link
Member

@m-allanson m-allanson commented May 30, 2018

Upgrading the examples is still a work in progress - any help would be very welcome!

Although note that the v2 upgrade guide hasn't been written yet, so you'll need to rely on checking how other examples have been changed and the placeholder breaking changes list.

If anyone wants to take any of these on, I'm happy to provide any guidance needed.

@pieh pieh added this to To Do - v2 in Gatsby v2 Release via automation May 30, 2018
@pieh pieh changed the title [v2] Update examples in v2 branch to utilize v2 code? [v2] Update examples in v2 branch May 30, 2018
@pieh

This comment has been minimized.

Copy link
Contributor

@pieh pieh commented May 30, 2018

I added this issue to v2 project, so people can discover it easier if they want to help out on v2

@webwurst

This comment has been minimized.

Copy link

@webwurst webwurst commented May 31, 2018

It would be nice to have a list of already ported and yet to be done examples :)

@m-allanson

This comment has been minimized.

Copy link
Member

@m-allanson m-allanson commented May 31, 2018

A list would be excellent - would you like to make one and and add it here?

You can check the package.json of each example to see which ones have been upgraded. For examples running on v2, their Gatsby dependencies will be using the next version and have react and react-dom included:

"gatsby": "next",
"gatsby-image": "next",
"gatsby-plugin-google-analytics": "next",
"gatsby-plugin-offline": "next",
"gatsby-plugin-sharp": "next",
"gatsby-plugin-typography": "next",
"gatsby-source-drupal": "next",
"gatsby-source-filesystem": "next",
"gatsby-transformer-sharp": "next",
"react": "^16.4.0",
"react-dom": "^16.4.0",

Examples running on v1 will have different version numbers and no react or react-dom:

"gatsby": "latest",
"gatsby-plugin-google-analytics": "^1.0.12",
"gatsby-plugin-offline": "^1.0.10",
"gatsby-plugin-react-helmet": "^2.0.1",
"gatsby-plugin-sharp": "latest",
"gatsby-plugin-typography": "latest",
"gatsby-remark-copy-linked-files": "latest",
"gatsby-remark-images": "latest",
"gatsby-remark-prismjs": "latest",
"gatsby-remark-responsive-iframe": "latest",
"gatsby-remark-smartypants": "latest",
"gatsby-source-filesystem": "latest",
"gatsby-transformer-remark": "latest",
"gatsby-transformer-sharp": "latest",

@m-allanson

This comment has been minimized.

Copy link
Member

@m-allanson m-allanson commented May 31, 2018

Oh and there's a work-in-progress migration guide at https://github.com/gatsbyjs/gatsby/blob/v2/docs/docs/migrating-from-v1-to-v2.md

@piotrkwiecinski

This comment has been minimized.

Copy link
Contributor

@piotrkwiecinski piotrkwiecinski commented Jun 1, 2018

I could probably grab sitemap one for start :). Happy to help

@m-allanson

This comment has been minimized.

Copy link
Member

@m-allanson m-allanson commented Jun 8, 2018

😍 for all the pull requests updating these examples. Keep 'em coming :)

@piotrkwiecinski

This comment has been minimized.

Copy link
Contributor

@piotrkwiecinski piotrkwiecinski commented Jun 8, 2018

RSS feed one has similar issue as sitemap. It's quite basic. I'll try to PR extended version to master first over the weekend.

@ryanditjia

This comment has been minimized.

Copy link
Contributor

@ryanditjia ryanditjia commented Jun 8, 2018

I’m getting errors with source-hacker-news.

⠠ source and transform nodesfetch HN data: 17699.665ms
success source and transform nodes — 23.070 s
error UNHANDLED REJECTION


  TypeError: Cannot read property 'internal' of undefined

 - build-node-types.js:85 _.flatMap.groupBy.node
    [project-name]/[gatsby]/dist/schema/build-node-typ    es.js:85:55

  - lodash.js:489 arrayAggregator
    [project-name]/[lodash]/lodash.js:489:34

  - lodash.js:4835 Function.groupBy
    [project-name]/[lodash]/lodash.js:4835:16

  - lodash.js:4380
    [project-name]/[lodash]/lodash.js:4380:28

  - lodash.js:675 arrayReduce
    [project-name]/[lodash]/lodash.js:675:21

  - lodash.js:4379 baseWrapperValue
    [project-name]/[lodash]/lodash.js:4379:14

  - lodash.js:9042 LodashWrapper.wrapperValue
    [project-name]/[lodash]/lodash.js:9042:14

  - build-node-types.js:85 createNodeFields
    [project-name]/[gatsby]/dist/schema/build-node-typ    es.js:85:111

  - build-node-types.js:171 fields
    [project-name]/[gatsby]/dist/schema/build-node-typ    es.js:171:23

  - Array.forEach

  npm ERR!
@ajayns

This comment has been minimized.

Copy link
Contributor

@ajayns ajayns commented Jun 11, 2018

@ryanditjia I'm getting the same errors. Looks like an issue with the plugin itself.

Also, going through using-javascript-transforms example, I'm unsure of what's going wrong but looks like it keeps throwing exports is undefined errors.

@m-allanson

This comment has been minimized.

Copy link
Member

@m-allanson m-allanson commented Aug 7, 2018

Thanks everyone for your help with this issue 🎉 Marking this as done.

@m-allanson m-allanson closed this Aug 7, 2018
Gatsby v2 Release automation moved this from To Do - v2 blockers to Done Aug 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
7 participants
You can’t perform that action at this time.