
After updating to the most recent version, I get this error when building. I've updated yarn and dependencies, not sure what's causing the issue?
Thanks!
agnes
I am also getting this error but only when building.
I logged out the error. It starts out like this:
error Error: failed to process https://x.com/wp-content/uploads/2020/03/Episode-020-Link-Building.mp3
TimeoutError: Timeout awaiting 'request' for 30000ms
at Ticket.<anonymous> (/Users/rasmuswolk/Projects/xx/xx-gatsby/node_modules/gatsby-source-wordpress-experimental/src/steps/source-nodes/create-nodes/create-remote-file-node/index.js:341:16)
the problem is that the code assumes that error is a string, while its an error object on which the method includes is not defined, see create-remote-media-item-node.js https://github.com/gatsbyjs/gatsby-source-wordpress-experimental/blob/add6ae1512335d1ffa230498eee76389ce7dc93e/plugin/src/steps/source-nodes/create-nodes/create-remote-media-item-node.js#L47
const errorPanicker = ({
error,
reporter,
node,
fetchState,
parentName
}) => {
const editUrl = getMediaItemEditLink(node);
const sharedError = `occured while fetching media item #${node.databaseId}${parentName ? ` in step:\n\n"${parentName}"` : ``}\n\nMedia item link: ${node.link}\nEdit link: ${editUrl}\nFile url: ${node.mediaItemUrl}`;
if (process.env.NODE_ENV !== `production` && error.includes(`Response code 404`)) {
fetchState.shouldBail = true;
reporter.log(``);
reporter.warn((0, _formatLogMessage.formatLogMessage)(`Error ${sharedError}\n\nThis error will fail production builds.`));
reporter.log(``);
return;
}
I am also getting this error but only when building.
I logged out the error. It starts out like this:
error Error: failed to process https://x.com/wp-content/uploads/2020/03/Episode-020-Link-Building.mp3 TimeoutError: Timeout awaiting 'request' for 30000ms at Ticket.<anonymous> (/Users/rasmuswolk/Projects/xx/xx-gatsby/node_modules/gatsby-source-wordpress-experimental/src/steps/source-nodes/create-nodes/create-remote-file-node/index.js:341:16)
@rasmuswoelk do you mind sharing how you logged the above? Thanks!
@Kallirroi I just went directly into the file that was written out in the console, found the line that logs out the errors, and just logged out the entire error. This will obviously only work locally and it will be overwritten when node_modules is reinstalled.
I had a section of my website where I was fetching and rendering some podcasts. After removing that part, the site builds again. I still need to figure out why it fails when it tries to process .mp4 files.
@rasmuswoelk thanks - yeah I did the same with the fix proposed above (which btw @rburgst lets it build successfully - thanks!), but agreed that proceeding like that is precarious.
A fix for this is published in [email protected]. Thanks @rburgst for the fix and everyone else for reporting this!
this is great, thanks so much!
Most helpful comment
the problem is that the code assumes that
erroris a string, while its an error object on which the methodincludesis not defined, seecreate-remote-media-item-node.jshttps://github.com/gatsbyjs/gatsby-source-wordpress-experimental/blob/add6ae1512335d1ffa230498eee76389ce7dc93e/plugin/src/steps/source-nodes/create-nodes/create-remote-media-item-node.js#L47