nextui-org / nextui-cli

⌨️ A CLI tool that unlocks seamless NextUI integration.
MIT License
46 stars 14 forks source link

[BUG] - ADD COMMAND IS NOT WORKING #100

Open xhyabunny opened 2 months ago

xhyabunny commented 2 months ago

NextUI Version

0.3.4

Describe the bug

My CLI gets stuck in the "add " command. Right when it does the NPM installation, it gets stuck in the first part of the installation process.

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

install nextui cli use pnpm in your project add a component with nextui add

Expected behavior

I expected a component to be added, but my cli gets stuck and i need to abort everytime i try adding something.

Screenshots or Videos

PS F:\workflow\nextjs\m-project-nextui> nextui add image

NextUI CLI v0.3.4

Adding required dependencies: @nextui-org/image

npm install @nextui-org/image ¿Desea terminar el trabajo por lotes (S/N)? ^C Unexpected error. Please report it as a bug:
Error: Command failed: npm install @nextui-org/image at genericNodeError (node:internal/errors:956:15) at wrappedFn (node:internal/errors:510:14)
at checkExecSyncError (node:child_process:890:11) at execSync (node:child_process:962:15)
at file:///C:/Users/bonni/AppData/Roaming/npm/node_modules/nextui-cli/dist/index.js:36:259
at new Promise () at fe (file:///C:/Users/bonni/AppData/Roaming/npm/node_modules/nextui-cli/dist/index.js:36:137) at st (file:///C:/Users/bonni/AppData/Roaming/npm/node_modules/nextui-cli/dist/index.js:36:471) at Command.un (file:///C:/Users/bonni/AppData/Roaming/npm/node_modules/nextui-cli/dist/index.js:75:1895) AppData\Roaming\npm\node_modules\nextui-cli\node_modules\commander\lib\command.js:935:5) {
status: 1, signal: null, output: [ null, null, null ], pid: 25872, stdout: null, stderr: null }

Operating System Version

Windows 10 Pro Enterprise 22H2

Browser

Opera

linear[bot] commented 2 months ago

ENG-1352 [BUG] - ADD COMMAND IS NOT WORKING

winchesHe commented 2 months ago

It maybe a network issue

Erijoda commented 1 month ago

I had the same issue in my GitHub codespace. For reasons unknown the .npmrc file had package-lock=false in it which caused the nextui-cli to not recognize that it should use pnpm.

So i had to change it to true and then run pnpm install.