{"record":{"id":"da30f416544ac38d","repo":"tailwindlabs/heroicons","slug":"you-re-trying-to-import-heroicons-vue-solid-pr","errorCode":null,"errorMessage":"You're trying to import `@heroicons/vue/solid/${property}` from Heroicons v1 but have installed Heroicons v2. Install `@heroicons/vue@v1` to resolve this error.","messagePattern":"You're trying to import `@heroicons/vue/solid/(.+?)` from Heroicons v1 but have installed Heroicons v2\\. Install `@heroicons/vue@v1` to resolve this error\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"vue/solid/index.js","lineNumber":9,"sourceCode":"let proxy = new Proxy(\n  {},\n  {\n    get: (obj, property) => {\n      if (property === '__esModule') {\n        return {}\n      }\n\n      throw new Error(\n        `You\\'re trying to import \\`@heroicons/vue/solid/${property}\\` from Heroicons v1 but have installed Heroicons v2. Install \\`@heroicons/vue@v1\\` to resolve this error.`\n      )\n    },\n  }\n)\n\nmodule.exports = proxy\n","sourceCodeStart":1,"sourceCodeEnd":17,"githubUrl":"https://github.com/tailwindlabs/heroicons/blob/616b7a4dbbf3d011760af8066262cd5c6b3868f3/vue/solid/index.js#L1-L17","documentation":"Same v1 compatibility shim as the Vue outline variant, but for the `solid` style: `@heroicons/vue/solid/<Icon>` throws under heroicons v2. V1's per-file default exports were replaced in v2 by named exports from size/style directories.","triggerScenarios":"`import BeakerIcon from '@heroicons/vue/solid/BeakerIcon'` or any access through `@heroicons/vue/solid` while v2 is installed. The Proxy get trap throws naming the requested icon.","commonSituations":"Vue apps upgraded from heroicons v1 without touching icon imports; shared component libraries authored against v1; outdated snippets and AI/editor suggestions; monorepos with mixed heroicons majors.","solutions":["Rewrite to `import { BeakerIcon } from '@heroicons/vue/24/solid'` (choose 16/20/24).","Or install v1: `npm install @heroicons/vue@v1` if migration is deferred.","Codemod all `@heroicons/vue/solid/<Icon>` imports; v2 uses named exports.","Align heroicons versions across packages and update editor snippets so v1 paths stop being generated."],"exampleFix":"// before\nimport BeakerIcon from '@heroicons/vue/solid/BeakerIcon'\n\n// after\nimport { BeakerIcon } from '@heroicons/vue/24/solid'","handlingStrategy":"validation","validationCode":"// detect v1 solid paths against v2\nconst pkg = require('@heroicons/vue/package.json')\nif (pkg.version.startsWith('2.')) {\n  const { execSync } = require('child_process')\n  const hits = execSync(\"grep -rl \\\"@heroicons/vue/solid/\\\" src || true\").toString().trim()\n  if (hits) throw new Error('v1-style @heroicons/vue/solid imports found: ' + hits)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Lock the heroicons major; regenerate lockfile on upgrades.","Codemod '/solid/<Icon>' default imports to named imports from '@heroicons/vue/24/solid'.","Lint rule banning '@heroicons/vue/solid' as an import prefix.","Keep monorepo packages on a single heroicons major."],"tags":["import","version-mismatch","breaking-change","migration","vue"],"backgroundTag":"heroicons-v1-v2-import-mismatch","analyzedSha":"616b7a4dbbf3d011760af8066262cd5c6b3868f3","analyzedAt":"2026-08-31T21:42:00.885Z","schemaVersion":2},"datasetVersion":"2026-08-31T22:30:34.772Z"}