{"record":{"id":"37d56bdcdfd93c42","repo":"shadcn-ui/ui","slug":"unsupported-path-type-options-path","errorCode":null,"errorMessage":"Unsupported path type: ${options.path}","messagePattern":"Unsupported path type: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/shadcn/src/migrations/migrate-icons.ts","lineNumber":98,"sourceCode":"    } else {\n      const fullPath = path.resolve(basePath, options.path)\n      const stat = await fs.stat(fullPath).catch(() => null)\n\n      if (!stat) {\n        throw new Error(`File not found: ${options.path}`)\n      }\n\n      if (stat.isDirectory()) {\n        basePath = fullPath\n        files = await fg(\"**/*.{js,ts,jsx,tsx}\", {\n          cwd: basePath,\n          onlyFiles: true,\n          ignore: [\"**/node_modules/**\"],\n        })\n      } else if (stat.isFile()) {\n        files = [options.path]\n      } else {\n        throw new Error(`Unsupported path type: ${options.path}`)\n      }\n    }\n\n    if (files.length === 0) {\n      throw new Error(`No files found matching: ${options.path}`)\n    }\n  } else {\n    if (!config.resolvedPaths.ui) {\n      throw new Error(\n        \"We could not find a valid `ui` path in your `components.json` file. Please ensure you have a valid `ui` path in your `components.json` file.\"\n      )\n    }\n\n    basePath = config.resolvedPaths.ui\n    files = await fg(\"**/*.{js,ts,jsx,tsx}\", {\n      cwd: basePath,\n    })\n  }","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/shadcn-ui/ui/blob/efac5987074af84ece57c367c6dd83387b967022/packages/shadcn/src/migrations/migrate-icons.ts#L80-L116","documentation":"fs.stat succeeded for --path but the entry is neither a regular file nor a directory — e.g., a socket, FIFO, character/block device, or a symlink whose target follows to a non-file/dir. The migrate-icons walker only handles files and directories.","triggerScenarios":"Pointing `shadcn migrate icons --path <p>` at a special filesystem entry: named pipe, unix socket, device node, or a broken symlink whose stat reports a non-file/non-dir type.","commonSituations":"Pointing at a node_modules internal socket, an OS device file under /dev, a broken symlink, or an unusual file type reported by a FUSE mount.","solutions":["Point --path at a regular file or a directory instead.","Remove or avoid the special file in the path.","If a broken symlink, fix or delete it."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":"import fs from \"fs-extra\"\nimport path from \"path\"\n\nasync function assertMigratablePath(configCwd: string, p: string) {\n  const stat = await fs.stat(path.resolve(configCwd, p)).catch(() => null)\n  if (!stat || (!stat.isFile() && !stat.isDirectory())) {\n    throw new Error(`Unsupported path type: ${p}`)\n  }\n}","typeGuard":"import fs from \"fs-extra\"\nimport path from \"path\"\n\nasync function isMigratablePath(configCwd: string, p: string): Promise<boolean> {\n  const stat = await fs.stat(path.resolve(configCwd, p)).catch(() => null)\n  return !!stat && (stat.isFile() || stat.isDirectory())\n}","tryCatchPattern":null,"preventionTips":["Avoid pointing --path at node_modules internals or OS device paths.","Use a glob (e.g., '**/*.{ts,tsx}') to restrict to source files."],"tags":["migrate","filesystem","validation","icons"],"backgroundTag":null,"analyzedSha":"efac5987074af84ece57c367c6dd83387b967022","analyzedAt":"2026-08-12T05:00:50.218Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}