Description
Details
After i tried NPM install in my project this error appeared and i tried all the standard methods suggested like cache clearing, reinstalling NPM packages and version upgrades and also a Node. I tried my older projects these seem to work fine but when i try to install NPM packages in react project this error appears, i used latest version of vite to create it, also latest versions of npm10.2.3
and Node.js v20.9.0.
Node.js version
Node.js v20.9.0.
Example code
npm ERR! code ERR_INVALID_ARG_TYPE
npm ERR! The "file" argument must be of type string. Received undefined
Operating system
windows 10
Scope
33 verbose stack TypeError: Cannot read properties of undefined (reading 'stdin')
33 verbose stack at promiseSpawn (C:\Users\PC\AppData\Roaming\npm\node_modules\npm\node_modules@npmcli\promise-spawn\lib\index.js:60:18)
33 verbose stack at spawnWithShell (C:\Users\PC\AppData\Roaming\npm\node_modules\npm\node_modules@npmcli\promise-spawn\lib\index.js:123:10)
33 verbose stack at promiseSpawn (C:\Users\PC\AppData\Roaming\npm\node_modules\npm\node_modules@npmcli\promise-spawn\lib\index.js:12:12)
33 verbose stack at runScriptPkg (C:\Users\PC\AppData\Roaming\npm\node_modules\npm\node_modules@npmcli\run-script\lib\run-script-pkg.js:79:13)
33 verbose stack at runScript (C:\Users\PC\AppData\Roaming\npm\node_modules\npm\node_modules@npmcli\run-script\lib\run-script.js:9:16)
33 verbose stack at RunScript.run (C:\Users\PC\AppData\Roaming\npm\node_modules\npm\lib\commands\run-script.js:121:13)
33 verbose stack at async module.exports (C:\Users\PC\AppData\Roaming\npm\node_modules\npm\lib\cli-entry.js:61:5)
34 verbose cwd C:\Users\PC\Desktop\Web development\React\01-starting-project
Module and version
npm10.2.3