nodejs / help

:sparkles: Need help with Node.js? File an Issue here. :rocket:
1.46k stars 279 forks source link

npm ERR! Cannot read properties of undefined (reading 'stdin') #4182

Closed MahomedCissokho closed 3 months ago

MahomedCissokho commented 1 year ago

Details

Hi !, I have a project with this configuration : React - Tailwindcss . When I try to run my react project with this command : npm run dev, I got this error :

npm ERR! Cannot read properties of undefined (reading 'stdin')

npm ERR! A complete log of this run can be found in: C:\Users\HP\AppData\Local\npm-cache_logs\2023-06-13T17_53_31_498Z-debug-0.log

Note: I have installed react using vite .

Node.js version

v18.15.0

Example code

No response

Operating system

Windows 10

Scope

Issue occured when I run the cmd : npm run dev

Module and version

Not applicable.

MahomedCissokho commented 1 year ago

npm ERR! A complete log of this run can be found in: C:\Users\HP\AppData\Local\npm-cache_logs\2023-06-13T17_53_31_498Z-debug-0.log

content of this file : 0 verbose cli C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js 1 info using npm@9.6.7 2 info using node@v18.15.0 3 timing npm:load:whichnode Completed in 4ms 4 timing config:load:defaults Completed in 4ms 5 timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc Completed in 4ms 6 timing config:load:builtin Completed in 4ms 7 timing config:load:cli Completed in 2ms 8 timing config:load:env Completed in 2ms 9 timing config:load:file:C:\Users\HP\Desktop\my-portfolio.npmrc Completed in 1ms 10 timing config:load:project Completed in 6ms 11 timing config:load:file:C:\Users\HP.npmrc Completed in 0ms 12 timing config:load:user Completed in 1ms 13 timing config:load:file:C:\Program Files\nodejs\etc\npmrc Completed in 0ms 14 timing config:load:global Completed in 0ms 15 timing config:load:setEnvs Completed in 2ms 16 timing config:load Completed in 23ms 17 timing npm:load:configload Completed in 23ms 18 timing npm:load:mkdirpcache Completed in 1ms 19 timing npm:load:mkdirplogs Completed in 0ms 20 verbose title npm run dev 21 verbose argv "run" "dev" 22 timing npm:load:setTitle Completed in 2ms 23 timing config:load:flatten Completed in 10ms 24 timing npm:load:display Completed in 11ms 25 verbose logfile logs-max:10 dir:C:\Users\HP\AppData\Local\npm-cache_logs\2023-06-13T18_21_50_940Z- 26 verbose logfile C:\Users\HP\AppData\Local\npm-cache_logs\2023-06-13T18_21_50_940Z-debug-0.log 27 timing npm:load:logFile Completed in 22ms 28 timing npm:load:timers Completed in 0ms 29 timing npm:load:configScope Completed in 0ms 30 timing npm:load Completed in 64ms 31 timing command:run Completed in 44ms 32 verbose stack TypeError: Cannot read properties of undefined (reading 'stdin') 32 verbose stack at promiseSpawn (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:60:18) 32 verbose stack at spawnWithShell (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:123:10) 32 verbose stack at promiseSpawn (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:12:12) 32 verbose stack at runScriptPkg (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\run-script\lib\run-script-pkg.js:79:13) 32 verbose stack at runScript (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\run-script\lib\run-script.js:9:16) 32 verbose stack at RunScript.run (C:\Program Files\nodejs\node_modules\npm\lib\commands\run-script.js:120:13) 32 verbose stack at async module.exports (C:\Program Files\nodejs\node_modules\npm\lib\cli.js:89:5) 33 verbose cwd C:\Users\HP\Desktop\my-portfolio 34 verbose Windows_NT 10.0.19045 35 verbose node v18.15.0 36 verbose npm v9.6.7 37 error Cannot read properties of undefined (reading 'stdin') 38 verbose exit 1 39 timing npm Completed in 165ms 40 verbose code 1 41 error A complete log of this run can be found in: C:\Users\HP\AppData\Local\npm-cache_logs\2023-06-13T18_21_50_940Z-debug-0.log

osamajavaid commented 1 year ago

facing the same issue, since morning

preveen-stack commented 1 year ago

cc @nodejs/npm PTAL

github-actions[bot] commented 4 months ago

It seems there has been no activity on this issue for a while, and it is being closed in 30 days. If you believe this issue should remain open, please leave a comment. If you need further assistance or have questions, you can also search for similar issues on Stack Overflow. Make sure to look at the README file for the most updated links.

github-actions[bot] commented 3 months ago

It seems there has been no activity on this issue for a while, and it is being closed. If you believe this issue should remain open, please leave a comment. If you need further assistance or have questions, you can also search for similar issues on Stack Overflow. Make sure to look at the README file for the most updated links.