{"record":{"id":"f9ceae252616a4f5","repo":"gatsbyjs/gatsby","slug":"url-passed-to-createremotefilenode-is-either-missi","errorCode":null,"errorMessage":"url passed to createRemoteFileNode is either missing or not a proper web uri: ${url}","messagePattern":"url passed to createRemoteFileNode is either missing or not a proper web uri: (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/gatsby-source-filesystem/src/create-remote-file-node.js","lineNumber":139,"sourceCode":"  }\n  if (typeof getCache === `function`) {\n    // use cache of this plugin and not cache of function caller\n    cache = getCache(`gatsby-source-filesystem`)\n  }\n  if (typeof cache !== `object`) {\n    throw new Error(\n      `Neither \"cache\" or \"getCache\" was passed. getCache must be function that return Gatsby cache, \"cache\" must be the Gatsby cache, was ${typeof cache}`\n    )\n  }\n\n  // Check if we already requested node for this remote file\n  // and return stored promise if we did.\n  if (processingCache[url]) {\n    return processingCache[url]\n  }\n\n  if (!url || isWebUri(url) === undefined) {\n    throw new Error(\n      `url passed to createRemoteFileNode is either missing or not a proper web uri: ${url}`\n    )\n  }\n\n  const fileDownloadPromise = processRemoteNode({\n    url,\n    cache,\n    createNode,\n    parentNodeId,\n    createNodeId,\n    auth,\n    httpHeaders,\n    ext,\n    name,\n  })\n\n  processingCache[url] = fileDownloadPromise.then(node => node)\n","sourceCodeStart":121,"sourceCodeEnd":157,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/8b06340921ffdf23125a365b9c9923690cb62ce6/packages/gatsby-source-filesystem/src/create-remote-file-node.js#L121-L157","documentation":"createRemoteFileNode rejects a URL that is falsy or fails the `isWebUri` check (validatable-weburi). The plugin must issue an HTTP GET, so it needs an absolute http/https URI. Anything else — a relative path, a malformed string, undefined, an FTP URL — is caught before any network call. Note the early processingCache short-circuit returns first, so a previously seen falsy key could mask this.","triggerScenarios":"Passing url: undefined or url: ''; passing a relative path like /images/foo.png; passing an FTP or file:// URL; passing a URL with spaces/unencoded characters that isWebUri rejects; passing a data URI.","commonSituations":"Reading a field from a remote source where the image/url field is sometimes empty; consuming an RSS feed or REST API that returns relative URLs; copy-paste that lost the protocol; environment where the upstream returns null for missing media.","solutions":["Validate the URL before calling: if (!url || isWebUri(url) === undefined) skip; then call createRemoteFileNode.","Prepend a base URL to relative paths: new URL(relative, baseUrl).toString().","Filter out falsy/empty url values in your sourceNodes loop before invoking the helper.","URL-encode any path segments that may contain spaces or unicode: encodeURI on the path portion only."],"exampleFix":"// before\nawait createRemoteFileNode({ url: post.image, cache, createNode, createNodeId })\n\n// after\nif (post.image && isWebUri(post.image)) {\n  await createRemoteFileNode({ url: post.image, cache, createNode, createNodeId })\n}","handlingStrategy":"validation","validationCode":"const isWebUri = require('valid-url').isWebUri\nif (!url || !isWebUri(url)) { throw new Error(`Skipping non-web URL: ${url}`) }","typeGuard":"const isAbsoluteWebUrl = (u) => typeof u === 'string' && /^https?:\\/\\/.+\\..+/i.test(u) && isWebUri(u) !== undefined","tryCatchPattern":"try { await createRemoteFileNode({ url, ...rest }) } catch (e) { if (/not a proper web uri/.test(e.message)) { reporter.warn(`Skipping invalid url: ${url}`); return } throw e }","preventionTips":["Pre-filter url fields from upstream sources before iterating","Normalize relative URLs with new URL(rel, base) before calling","Log empty/null url fields during sourcing to find upstream gaps early"],"tags":["gatsby","validation","url","network"],"backgroundTag":null,"analyzedSha":"8b06340921ffdf23125a365b9c9923690cb62ce6","analyzedAt":"2026-08-13T02:36:21.405Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}