You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like c12 cannot resolve config when the name and config file are the same name as another directory like
components.json in the root emptycomponentdirectory (folder) in the root
Additional context
I think it's related to Jiti
Logs
Error: EISDIR: illegal operation on a directory, read
at Object.readSync (node:fs:751:3)
at tryReadSync (node:fs:451:20)
at readFileSync (node:fs:497:19)
at Object.jiti (***\Projects\Vue\c12-error\node_modules\.pnpm\jiti@1.21.0\node_modules\jiti\dist\jiti.js:1:254411)
at resolveConfig (file:///***/Projects/Vue/c12-error/node_modules/.pnpm/c12@1.10.0/node_modules/c12/dist/index.mjs:330:26)
at loadConfig (file:///***/Projects/Vue/c12-error/node_modules/.pnpm/c12@1.10.0/node_modules/c12/dist/index.mjs:140:40)
at getRawConfig (file:///***/Projects/Vue/c12-error/c12.js:27:34)
at main (file:///***/Projects/Vue/c12-error/c12.js:43:24)
at file:///***/Projects/Vue/c12-error/c12.js:48:1
at ModuleJob.run (node:internal/modules/esm/module_job:194:25) {
errno: -4068,
syscall: 'read',
code: 'EISDIR'
}
The text was updated successfully, but these errors were encountered:
Thanks for detailed reproduction it helps a LOT. I will be back to it but probably not this week, if you had time to investigate down to jiti (hint: I guess it is esm resolve and mlly) that would accelerate fixing this issue.
BTW: As best practice, please consider explicitly naming your config after your tool (not generic names like components or app)
Environment
Tested with node
v18.8.2
on Windowsand node
20.11.1
in macOSand node
v18.8.0
in StackBlitz@pi0 sorry for the tag, but we very much need this fix in
shadcn-vue
🙏related issue in shadcn-vue radix-vue/shadcn-vue#387
Reproduction
Describe the bug
Tested in
Windows 11 ❌
macOS ❌
StackBlitz ✅
Looks like
c12
cannot resolve config when the name and config file are the same name as another directory likecomponents.json
in the rootempty
component
directory (folder) in the rootAdditional context
I think it's related to Jiti
Logs
The text was updated successfully, but these errors were encountered: