{"record":{"id":"9b84e98df9d16961","repo":"withastro/astro","slug":"packagename-doesn-t-appear-to-be-an-integration","errorCode":null,"errorMessage":"${packageName} doesn't appear to be an integration or an adapter. Find our official integrations at https://astro.build/integrations","messagePattern":"(.+?) doesn't appear to be an integration or an adapter\\. Find our official integrations at https://astro\\.build/integrations","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/astro/src/cli/add/index.ts","lineNumber":922,"sourceCode":"\t\t\t\tif (pkgJson['peerDependencies']) {\n\t\t\t\t\tconst meta = pkgJson['peerDependenciesMeta'] || {};\n\t\t\t\t\tfor (const peer in pkgJson['peerDependencies']) {\n\t\t\t\t\t\tconst optional = meta[peer]?.optional || false;\n\t\t\t\t\t\tconst isAstro = peer === 'astro';\n\t\t\t\t\t\tif (!optional && !isAstro) {\n\t\t\t\t\t\t\tdependencies.push([peer, pkgJson['peerDependencies'][peer]]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tlet integrationType: IntegrationInfo['type'];\n\t\t\t\tconst keywords = Array.isArray(pkgJson['keywords']) ? pkgJson['keywords'] : [];\n\t\t\t\tif (keywords.includes('astro-integration')) {\n\t\t\t\t\tintegrationType = 'integration';\n\t\t\t\t} else if (keywords.includes('astro-adapter')) {\n\t\t\t\t\tintegrationType = 'adapter';\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t`${bold(\n\t\t\t\t\t\t\tpackageName,\n\t\t\t\t\t\t)} doesn't appear to be an integration or an adapter. Find our official integrations at ${cyan(\n\t\t\t\t\t\t\t'https://astro.build/integrations',\n\t\t\t\t\t\t)}`,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif (integration === 'tailwind') {\n\t\t\t\t\tintegrationName = 'tailwind';\n\t\t\t\t\tdependencies = [\n\t\t\t\t\t\t['@tailwindcss/vite', '^4.0.0'],\n\t\t\t\t\t\t['tailwindcss', '^4.0.0'],\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tid: integration,\n\t\t\t\t\tpackageName,","sourceCodeStart":904,"sourceCodeEnd":940,"githubUrl":"https://github.com/withastro/astro/blob/d081033d5fe8e8a68c4bbbad4af9d2deb9c74bca/packages/astro/src/cli/add/index.ts#L904-L940","documentation":"After fetching a package's package.json, `astro add` decides whether it is an integration or an adapter by checking its `keywords` for 'astro-integration' or 'astro-adapter'. If neither keyword is present, it throws this Error pointing the user to the integrations page. The package exists on npm but is not labeled as Astro-compatible.","triggerScenarios":"Running `astro add <pkg>` for a real npm package whose package.json lacks both `astro-integration` and `astro-adapter` in its keywords array. Common with unrelated packages that happen to share a name, or community packages that forgot the keyword.","commonSituations":"A community integration that did not add `astro-integration` to its keywords; passing a plain utility library by mistake; package name collision with a non-Astro package; the integration is set up via a different install method.","solutions":["Confirm the package is meant for Astro; if so, ask its maintainer to add `astro-integration` (or `astro-adapter`) to package.json keywords.","Find the correct official/community integration at https://astro.build/integrations and use that name.","If the package is valid but unlabeled, install it manually (`pnpm add <pkg>`) and add it to integrations in astro.config.mjs yourself.","Double-check for a typo that resolved to a different, non-Astro package."],"exampleFix":"# before — real npm package, no astro keyword\nastro add some-random-utils\n\n# after — install manually and register\npnpm add some-random-utils\n// astro.config.mjs\nimport somePlugin from 'some-random-utils';\nexport default defineConfig({ integrations: [somePlugin()] });","handlingStrategy":"validation","validationCode":"async function hasAstroKeyword(name: string, tag = 'latest') {\n  const r = await fetch(`https://registry.npmjs.org/${encodeURIComponent(name)}/${tag}`);\n  if (!r.ok) return false;\n  const pkg = await r.json();\n  const kw: string[] = Array.isArray(pkg.keywords) ? pkg.keywords : [];\n  return kw.includes('astro-integration') || kw.includes('astro-adapter');\n}","typeGuard":"function isAstroIntegrationPkg(pkg: { keywords?: unknown }): boolean {\n  return Array.isArray(pkg.keywords) && (pkg.keywords.includes('astro-integration') || pkg.keywords.includes('astro-adapter'));\n}","tryCatchPattern":null,"preventionTips":["Source integrations from the official registry page.","If you publish an integration, always include the astro-integration keyword.","Install unlabeled packages manually and register them in astro.config."],"tags":["cli","astro-add","npm","integration","validation"],"backgroundTag":null,"analyzedSha":"d081033d5fe8e8a68c4bbbad4af9d2deb9c74bca","analyzedAt":"2026-08-12T13:37:29.035Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}