N
Nuxt8mo ago
rotx

Initiating Project Fails

Hi, I followed guide on https://nuxt.com/docs/getting-started/installation and got the following error while it was installing. I tried clearing NPM cache but it didn't seem to work.
npx nuxi@latest init testing-project
Need to install the following packages:
nuxi@3.11.1
Ok to proceed? (y) y

✔ Which package manager would you like to use?
npm
◐ Installing dependencies... 3:46:21 PM

> postinstall
> nuxt prepare


[3:48:05 PM] ERROR Cannot find module 'C:\Users\UsernameWasHere\Documents\GitHub\testing-project\node_modules\@nuxt\devtools\dist\runtime\shared\hooks' imported from C:\Users\UsernameWasHere\Documents\GitHub\testing-project\node_modules\@nuxt\devtools\dist\chunks\module-main.mjs

at finalizeResolution (node:internal/modules/esm/resolve:264:11)
at moduleResolve (node:internal/modules/esm/resolve:917:10)
at defaultResolve (node:internal/modules/esm/resolve:1130:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:396:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:365:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:240:38)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:39)
at link (node:internal/modules/esm/module_job:84:36)



[3:48:05 PM] ERROR Cannot find module 'C:\Users\UsernameWasHere\Documents\GitHub\testing-project\node_modules\@nuxt\devtools\dist\runtime\shared\hooks' imported from C:\Users\UsernameWasHere\Documents\GitHub\testing-project\node_modules\@nuxt\devtools\dist\chunks\module-main.mjs

npm ERR! code 1
npm ERR! path C:\Users\UsernameWasHere\Documents\GitHub\testing-project
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c nuxt prepare

npm ERR! A complete log of this run can be found in: C:\Users\UsernameWasHere\AppData\Local\npm-cache\_logs\2024-05-10T13_46_22_348Z-debug-0.log

ERROR Error: Command failed with exit code 1: npm install
npx nuxi@latest init testing-project
Need to install the following packages:
nuxi@3.11.1
Ok to proceed? (y) y

✔ Which package manager would you like to use?
npm
◐ Installing dependencies... 3:46:21 PM

> postinstall
> nuxt prepare


[3:48:05 PM] ERROR Cannot find module 'C:\Users\UsernameWasHere\Documents\GitHub\testing-project\node_modules\@nuxt\devtools\dist\runtime\shared\hooks' imported from C:\Users\UsernameWasHere\Documents\GitHub\testing-project\node_modules\@nuxt\devtools\dist\chunks\module-main.mjs

at finalizeResolution (node:internal/modules/esm/resolve:264:11)
at moduleResolve (node:internal/modules/esm/resolve:917:10)
at defaultResolve (node:internal/modules/esm/resolve:1130:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:396:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:365:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:240:38)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:39)
at link (node:internal/modules/esm/module_job:84:36)



[3:48:05 PM] ERROR Cannot find module 'C:\Users\UsernameWasHere\Documents\GitHub\testing-project\node_modules\@nuxt\devtools\dist\runtime\shared\hooks' imported from C:\Users\UsernameWasHere\Documents\GitHub\testing-project\node_modules\@nuxt\devtools\dist\chunks\module-main.mjs

npm ERR! code 1
npm ERR! path C:\Users\UsernameWasHere\Documents\GitHub\testing-project
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c nuxt prepare

npm ERR! A complete log of this run can be found in: C:\Users\UsernameWasHere\AppData\Local\npm-cache\_logs\2024-05-10T13_46_22_348Z-debug-0.log

ERROR Error: Command failed with exit code 1: npm install
Nuxt
Installation · Get Started with Nuxt
Get started with Nuxt quickly with our online starters or start locally with your terminal.
4 Replies
rotx
rotxOP8mo ago
Node.js version: v20.11.1 NPM Version: 10.5.0 I also tried with bun here is the result:
ERROR TTY initialization failed: uv_tty_init returned EBADF (bad file descriptor) 6:00:06 PM

at new SystemError (node:internal/errors:259:5)
at new NodeError (node:internal/errors:370:7)
at new WriteStream (node:tty:93:11)
at sD.prompt (/C:/Users/UsernameWasHere/Documents/GitHub/testing-project/node_modules/consola/dist/chunks/prompt.mjs:141:676)
at confirm (/C:/Users/UsernameWasHere/Documents/GitHub/testing-project/node_modules/consola/dist/chunks/prompt.mjs:251:6)
at Module.prompt (/C:/Users/UsernameWasHere/Documents/GitHub/testing-project/node_modules/consola/dist/chunks/prompt.mjs:404:18)
at /C:/Users/UsernameWasHere/Documents/GitHub/testing-project/node_modules/consola/dist/shared/consola.36c0034f.mjs:617:71
at async ensureUserconsent (/C:/Users/UsernameWasHere/Documents/GitHub/testing-project/node_modules/@nuxt/telemetry/dist/shared/telemetry.023ac76b.mjs:26:20)
at async setup (/C:/Users/UsernameWasHere/Documents/GitHub/testing-project/node_modules/@nuxt/telemetry/dist/module.mjs:363:74)
at async normalizedModule (/C:/Users/UsernameWasHere/Documents/GitHub/testing-project/node_modules/@nuxt/kit/dist/index.mjs:2112:17)



ERROR TTY initialization failed: uv_tty_init returned EBADF (bad file descriptor) 6:00:06 PM

error: postinstall script from "nuxt-app" exited with 1

ERROR Error: Command failed with exit code 1: bun install
ERROR TTY initialization failed: uv_tty_init returned EBADF (bad file descriptor) 6:00:06 PM

at new SystemError (node:internal/errors:259:5)
at new NodeError (node:internal/errors:370:7)
at new WriteStream (node:tty:93:11)
at sD.prompt (/C:/Users/UsernameWasHere/Documents/GitHub/testing-project/node_modules/consola/dist/chunks/prompt.mjs:141:676)
at confirm (/C:/Users/UsernameWasHere/Documents/GitHub/testing-project/node_modules/consola/dist/chunks/prompt.mjs:251:6)
at Module.prompt (/C:/Users/UsernameWasHere/Documents/GitHub/testing-project/node_modules/consola/dist/chunks/prompt.mjs:404:18)
at /C:/Users/UsernameWasHere/Documents/GitHub/testing-project/node_modules/consola/dist/shared/consola.36c0034f.mjs:617:71
at async ensureUserconsent (/C:/Users/UsernameWasHere/Documents/GitHub/testing-project/node_modules/@nuxt/telemetry/dist/shared/telemetry.023ac76b.mjs:26:20)
at async setup (/C:/Users/UsernameWasHere/Documents/GitHub/testing-project/node_modules/@nuxt/telemetry/dist/module.mjs:363:74)
at async normalizedModule (/C:/Users/UsernameWasHere/Documents/GitHub/testing-project/node_modules/@nuxt/kit/dist/index.mjs:2112:17)



ERROR TTY initialization failed: uv_tty_init returned EBADF (bad file descriptor) 6:00:06 PM

error: postinstall script from "nuxt-app" exited with 1

ERROR Error: Command failed with exit code 1: bun install
I got it working using pnpm, but it didn't work with others. It's unfortunate since I don't use pnpm.
Nasr galal
Nasr galal8mo ago
what happens when you use this command:
npx nuxi@latest devtools enable
# OR
npx nuxi@latest devtools disable
npx nuxi@latest devtools enable
# OR
npx nuxi@latest devtools disable
rotx
rotxOP8mo ago
Hi, I didn't notice your reply. Anyway, I tried to run NPX command to create a project again today, and it worked with no problems not sure what the problem was I did not update anything, and my PC was restarted a few times since I created the thread so that fixed it maybe. Thanks anyways.
Nasr galal
Nasr galal8mo ago
Oh glad to hear that it worked smoothly, well if you are using windows, sometimes windows gets crazy 😄
Want results from more Discord servers?
Add your server