{"record":{"id":"7d0cd725711e738c","repo":"gatsbyjs/gatsby","slug":"lmdb-and-other-modules-with-native-dependencies-ar","errorCode":null,"errorMessage":"LMDB and other modules with native dependencies are not supported in Gatsby Functions.\\nIf you are importing utils from `gatsby-core-utils`, make sure to import from a specific module (for example `gatsby-core-utils/create-content-digest`).","messagePattern":"LMDB and other modules with native dependencies are not supported in Gatsby Functions\\.\\\\nIf you are importing utils from `gatsby-core-utils`, make sure to import from a specific module \\(for example `gatsby-core-utils/create-content-digest`\\)\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby/src/internal-plugins/functions/gatsby-node.ts","lineNumber":413,"sourceCode":"              presets: [\n                gatsbyPluginTSRequire.resolve(`@babel/preset-typescript`),\n              ],\n            },\n          },\n        },\n      ],\n    },\n    plugins: [\n      new webpack.DefinePlugin({\n        PREFIX_TO_STRIP: JSON.stringify(\n          program.prefixPaths ? pathPrefix?.replace(/(^\\/+|\\/+$)/g, ``) : ``\n        ),\n        ...processEnvVars,\n      }),\n      new webpack.IgnorePlugin({\n        checkResource(resource): boolean {\n          if (resource === `lmdb`) {\n            reporter.warn(\n              `LMDB and other modules with native dependencies are not supported in Gatsby Functions.\\nIf you are importing utils from \\`gatsby-core-utils\\`, make sure to import from a specific module (for example \\`gatsby-core-utils/create-content-digest\\`).`\n            )\n            return true\n          }\n          return false\n        },\n      }),\n    ],\n  }\n}\n\nlet isFirstBuild = true\nexport async function onPreBootstrap({\n  reporter,\n  store,\n  parentSpan,\n}: ParentSpanPluginArgs): Promise<void> {\n  const activity = reporter.activityTimer(`Compiling Gatsby Functions`, {","sourceCodeStart":395,"sourceCodeEnd":431,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby/src/internal-plugins/functions/gatsby-node.ts#L395-L431","documentation":"A webpack IgnorePlugin checkResource hook, used while bundling Gatsby Functions, intercepts imports of `lmdb` (a native-dependency module that cannot run inside the Functions bundle). When user function code (often transitively via gatsby-core-utils) requires lmdb, the build warns and the import is ignored/externalized rather than bundled.","triggerScenarios":"Thrown at packages/gatsby/src/internal-plugins/functions/gatsby-node.ts:413 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Import specific submodules from gatsby-core-utils (e.g. gatsby-core-utils/create-content-digest) instead of the index","Remove or lazy-load lmdb-based persistence from code used inside Gatsby Functions","Move native-dependency work to gatsby-node or a build step rather than a runtime function"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e85d62f1779e353eaac1753211629a26d123e26c","analyzedAt":"2026-08-26T17:50:09.662Z","contentChangedAt":"2026-08-26T17:50:09.662Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}