{"record":{"id":"6353a65a3b584528","repo":"withastro/astro","slug":"the-astrojs-netlify-functions-import-is-deprecate","errorCode":null,"errorMessage":"The @astrojs/netlify/functions import is deprecated and will be removed in a future release. Please use @astrojs/netlify instead.","messagePattern":"The @astrojs/netlify/functions import is deprecated and will be removed in a future release\\. Please use @astrojs/netlify instead\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/integrations/netlify/src/functions.ts","lineNumber":5,"sourceCode":"import type { AstroIntegration } from 'astro';\nimport netlifyIntegration, { type NetlifyIntegrationConfig } from './index.js';\n\nexport default function functionsIntegration(config: NetlifyIntegrationConfig): AstroIntegration {\n\tconsole.warn(\n\t\t'The @astrojs/netlify/functions import is deprecated and will be removed in a future release. Please use @astrojs/netlify instead.',\n\t);\n\treturn netlifyIntegration(config);\n}\n","sourceCodeStart":1,"sourceCodeEnd":10,"githubUrl":"https://github.com/withastro/astro/blob/52e6c34790cc8ac4e69e6135ace06049867e5c4a/packages/integrations/netlify/src/functions.ts#L1-L10","documentation":"The @astrojs/netlify/functions subpath export is a deprecated compatibility shim: importing it prints this console.warn and simply delegates to the default export of the main @astrojs/netlify entry, which now auto-detects the deployment target. It exists only so older configs keep working and will be removed in a future release.","triggerScenarios":" astro.config.mjs contains import netlify from '@astrojs/netlify/functions' (the pre-v5 split entrypoint for server output). Loading the config executes the shim module and the console.warn fires once at import time.","commonSituations":" Upgrading a project from @astrojs/netlify v4 or earlier where /functions and /static subpath imports were the documented pattern; stale docs, examples, or templates referencing the old entries.","solutions":["Change the import to the package root: import netlify from '@astrojs/netlify'; and drop the /functions suffix.","Remove the /functions path from TypeScript types/autoload too (the root export accepts the same NetlifyIntegrationConfig).","Also migrate any @astrojs/netlify/static import to the root entry (same deprecation).","Rebuild; the warning should no longer print during config load."],"exampleFix":"// before\nimport netlify from '@astrojs/netlify/functions';\nexport default defineConfig({ adapter: netlify() });\n\n// after\nimport netlify from '@astrojs/netlify';\nexport default defineConfig({ adapter: netlify() });","handlingStrategy":"validation","validationCode":"// codemod check: fail CI if the deprecated subpath is still referenced\nimport { readFile } from 'node:fs/promises';\nconst cfg = await readFile('astro.config.mjs', 'utf8');\nif (cfg.includes(\"'@astrojs/netlify/functions'\")) {\n  throw new Error('Use the root @astrojs/netlify import, not /functions');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Import only from '@astrojs/netlify'; treat subpath imports as removed code.","Run a grep for '@astrojs/netlify/' after upgrading the adapter.","Watch the adapter's CHANGELOG for removal of the shims before major upgrades."],"tags":["netlify","deprecation","adapter","import-path","migration"],"backgroundTag":"deprecated-import-path","analyzedSha":"52e6c34790cc8ac4e69e6135ace06049867e5c4a","analyzedAt":"2026-08-18T18:48:03.901Z","contentChangedAt":"2026-08-18T18:48:03.901Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}