{"record":{"id":"34e5c911767b8e03","repo":"withastro/astro","slug":"the-astrojs-netlify-static-import-is-deprecated-a","errorCode":null,"errorMessage":"The @astrojs/netlify/static import is deprecated and will be removed in a future release. Please use @astrojs/netlify instead.","messagePattern":"The @astrojs/netlify/static 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/static.ts","lineNumber":4,"sourceCode":"import netlifyIntegration from './index.js';\n\nexport default function staticIntegration() {\n\tconsole.warn(\n\t\t'The @astrojs/netlify/static import is deprecated and will be removed in a future release. Please use @astrojs/netlify instead.',\n\t);\n\treturn netlifyIntegration();\n}\n","sourceCodeStart":1,"sourceCodeEnd":9,"githubUrl":"https://github.com/withastro/astro/blob/52e6c34790cc8ac4e69e6135ace06049867e5c4a/packages/integrations/netlify/src/static.ts#L1-L9","documentation":"The @astrojs/netlify/static subpath export is a deprecated compatibility shim: importing it prints this console.warn and delegates to the root @astrojs/netlify entry, which detects static vs server output automatically. The shim will be removed in a future release; behavior is otherwise identical.","triggerScenarios":" astro.config.mjs contains import netlify from '@astrojs/netlify/static' (the pre-v5 static-output entrypoint). The module is evaluated at config load, triggering the console.warn immediately.","commonSituations":" Projects upgraded from @astrojs/netlify v4.x where static sites were told to use the /static entry; older deployment templates and CI configs referencing the subpath.","solutions":["Import from the package root instead: import netlify from '@astrojs/netlify'; and call netlify() with no arguments for static output.","Migrate any @astrojs/netlify/functions import the same way.","Rebuild and confirm the deprecation warning is gone during config load."],"exampleFix":"// before\nimport netlify from '@astrojs/netlify/static';\nexport default defineConfig({ adapter: netlify() });\n\n// after\nimport netlify from '@astrojs/netlify';\nexport default defineConfig({ adapter: netlify() });","handlingStrategy":"validation","validationCode":"const cfg = await readFile('astro.config.mjs', 'utf8');\nif (cfg.includes(\"'@astrojs/netlify/static'\")) {\n  throw new Error('Use the root @astrojs/netlify import, not /static');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Import the adapter only from '@astrojs/netlify'; it detects static vs server output itself.","Grep for '@astrojs/netlify/' when upgrading from v4 to v5+.","Keep deployment docs/templates pointing at the root entry."],"tags":["netlify","deprecation","adapter","import-path","static"],"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-14T05:17:10.506Z"}