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
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.
I added this issue to v2 project, so people can discover it easier if they want to help out on v2
It would be nice to have a list of already ported and yet to be done examples :)
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:
Examples running on v1 will have different version numbers and no react or react-dom:
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
Examples migrated to Gatsby v2:
I could probably grab sitemap one for start :). Happy to help
😍 for all the pull requests updating these examples. Keep 'em coming :)
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.
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!
@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.
Thanks everyone for your help with this issue 🎉 Marking this as done.
Most helpful comment
Examples migrated to Gatsby v2: