[gatsby-source-filesystem] errors are ignored in createRemoteFileNode
See original GitHub issueTook me a while to find a bug in my sourceNodes
code, because errors are ignored in createRemoteFileNode
inside processRemoteNode function.
I kept getting null
back from createRemoteFileNode
. So after some digging, I put a console.log directly into gatsby-source-filesystem inside my node_modules and see the error
error TypeError: createNodeId is not a function
at /home/bojan/www/instaset/website/node_modules/gatsby-source-filesystem/create-file-node.js:61:11
at Generator.next (<anonymous>)
at step (/home/bojan/www/instaset/website/node_modules/@babel/runtime/helpers/asyncToGenerator.js:12:30)
at _next (/home/bojan/www/instaset/website/node_modules/@babel/runtime/helpers/asyncToGenerator.js:27:9)
at run (/home/bojan/www/instaset/website/node_modules/core-js/library/modules/es6.promise.js:75:22)
at /home/bojan/www/instaset/website/node_modules/core-js/library/modules/es6.promise.js:92:30
at flush (/home/bojan/www/instaset/website/node_modules/core-js/library/modules/_microtask.js:18:9)
at process._tickCallback (internal/process/next_tick.js:61:11)
Maybe we can do something about that?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:9 (5 by maintainers)
Top Results From Across the Web
gatsby-source-filesystem
A Gatsby source plugin for sourcing data into your Gatsby application from your local filesystem. The plugin creates File nodes from files.
Read more >How to use the gatsby-source-filesystem ... - Snyk
To help you get started, we've selected a few gatsby-source-filesystem.createRemoteFileNode examples, based on popular ways it is used in public projects.
Read more >gatsby - How to create remote file node for contentful image
If I understand correctly, I have to use createRemoteFileNode from the gatsby-source-filesystem plugin. But I have a problem because I think ...
Read more >gatsby-source-filesystem/README.md - UNPKG
3, A Gatsby source plugin for sourcing data into your Gatsby application. 4, from your local filesystem. 5. 6, The plugin creates `File`...
Read more >Gatsby Changelog | 5.3.0
You might have run into an error like this while using Gatsby: ... Apprentice76: fix(gatsby-source-filesystem): Update createRemoteFileNode args PR #35422 ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hmm … I didn’t present this problem in a correct way 😃 I know about the new
createNodeId
parameter. But I made a mistake and imported it fromactions
instead ofprops
createRemoteFileNode
kept returningnull
, and there was no error, because it is ignored. Is this intentional?I already solved my problem, you can close this issue if you wish. Just wanted to point this out 😉
This is the right way to destructure props:
This is probably what you need https://next.gatsbyjs.org/docs/migrating-from-v1-to-v2/#createremotefilenode