cschroeter / park-ui

Beautifully designed components built with Ark UI and Panda CSS that work with a variety of JS frameworks.
https://park-ui.com
MIT License
1.68k stars 75 forks source link

Cannot install any components with the CLI on Windows #113

Closed juliomuhlbauer closed 10 months ago

juliomuhlbauer commented 10 months ago

Error:

Failed to download utils. ENOTDIR: not a directory, mkdir 'F:\code\quintohectare\tsconfig.json/./src/lib'
 ERROR  Command failed with exit code 1: park-ui init

pnpm: Command failed with exit code 1: park-ui init
    at makeError (C:\Users\julio\AppData\Local\node\corepack\pnpm\8.6.11\dist\pnpm.cjs:24890:17)
    at handlePromise (C:\Users\julio\AppData\Local\node\corepack\pnpm\8.6.11\dist\pnpm.cjs:25461:33)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Object.handler [as dlx] (C:\Users\julio\AppData\Local\node\corepack\pnpm\8.6.11\dist\pnpm.cjs:210334:7)
    at async C:\Users\julio\AppData\Local\node\corepack\pnpm\8.6.11\dist\pnpm.cjs:219737:21
    at async main (C:\Users\julio\AppData\Local\node\corepack\pnpm\8.6.11\dist\pnpm.cjs:219704:34)
    at async runPnpm (C:\Users\julio\AppData\Local\node\corepack\pnpm\8.6.11\dist\pnpm.cjs:219960:5)
    at async C:\Users\julio\AppData\Local\node\corepack\pnpm\8.6.11\dist\pnpm.cjs:219952:7

My config:

{
  "cssFramework": "panda",
  "jsFramework": "react",
  "importAliases": {
    "components": "@/components/ui",
    "utils": "@/lib"
  },
  "useReactServerComponents": true
}
allysontsoares commented 10 months ago

My is not working too (NextJS on Windows)!

Terminal:

"◇ Failed to download utils. ENOTDIR: not a directory, mkdir 'D:\Bemsoft\Dev\WiseLab\web\wiselab-web\tsconfig.json/./src/lib' PS D:\Bemsoft\Dev\WiseLab\web\wiselab-web> park-ui add button │ ◇ Failed to download Button component ENOTDIR: not a directory, mkdir 'D:\Bemsoft\Dev\WiseLab\web\wiselab-web\tsconfig.json/./src/components/ui'"

====================================== park-ui.json:

"{
  "cssFramework": "panda",
  "jsFramework": "react",
  "importAliases": {
    "components": "~/components/ui",
    "utils": "~/lib"
  },
  "useReactServerComponents": true
}"

======================================

tsconfig.json:

"{
  "compilerOptions": {
    "target": "esnext",
    "lib": ["dom", "dom.iterable", "esnext"],
    "allowJs": true,
    "skipLibCheck": true,
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "noEmit": true,
    "esModuleInterop": true,
    "module": "esnext",
    "moduleResolution": "bundler",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "jsx": "preserve",
    "incremental": true,
    "baseUrl": ".",
    "plugins": [
      {
        "name": "next"
      }
    ],
    "paths": {
      "~/*": ["./src/*"]
    }
  },
  "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "postcss.config.cjs"],
  "exclude": ["node_modules"]
}"

@cschroeter do you know how to make it work on Windows? Seems like the path is like "tsconfig.json/./src/lib" at the time of creating the folders and components, i think this "tsconfig.json" should not be in there. I guess there's something related to that, but i don't know if i have to do something in my project to make it work or if the CLI itselft adding this on the path yet.

sholzmayer commented 10 months ago

I've just released a fix in the version 0.4.2. Can you test it? I'm not a windows user.

npm install @park-ui/cli -g should update it if you installed it with npm globally.

juliomuhlbauer commented 10 months ago

Updated, but it didn't work:

Failed to download utils. ENOTDIR: not a directory, mkdir 'F:\code\quintohectare\tsconfig.json/./src/lib'
cschroeter commented 10 months ago

Please try 0.4.3 and open a new issue if that problem persist.

juliomuhlbauer commented 10 months ago

Thanks! It worked for me.