npm runが使えない
powershellでnpm runのコマンドが使えません
windowsでpowershellを使いnpm runを使うコマンドを実行するとscriptに書いてあるコマンドに影響せず同じエラーが発生します。bashでも同様のエラーが発生しますがcmdを使うとエラーは起こらず実行できます。
発生している問題・エラー
0 verbose cli C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js
1 info using npm@10.9.2
2 info using node@v22.14.0
3 silly config load:file:C:\Program Files\nodejs\node_modules\npm\npmrc
4 silly config load:file:C:\Users\ny090\OneDrive\デスクトップ\react\real-time-communication-app\.npmrc
5 silly config load:file:C:\Users\ny090\.npmrc
6 silly config load:file:C:\Users\ny090\AppData\Roaming\npm\etc\npmrc
7 verbose title npm run dev
8 verbose argv "run" "dev" "--loglevel" "verbose"
9 verbose logfile logs-max:10 dir:C:\Users\ny090\AppData\Local\npm-cache\_logs\2025-03-12T13_13_59_560Z-
10 verbose logfile C:\Users\ny090\AppData\Local\npm-cache\_logs\2025-03-12T13_13_59_560Z-debug-0.log
11 silly logfile start cleaning logs, removing 1 files
12 silly logfile done cleaning log files
13 verbose stack TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received undefined
13 verbose stack at normalizeSpawnArguments (node:child_process:539:3)
13 verbose stack at spawn (node:child_process:746:13)
13 verbose stack at promiseSpawn (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:39:16)
13 verbose stack at spawnWithShell (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:124:10)
13 verbose stack at promiseSpawn (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:12:12)
13 verbose stack at runScriptPkg (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\run-script\lib\run-script-pkg.js:77:13)
13 verbose stack at runScript (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\run-script\lib\run-script.js:9:12)
13 verbose stack at #run (C:\Program Files\nodejs\node_modules\npm\lib\commands\run-script.js:131:13)
13 verbose stack at async RunScript.exec (C:\Program Files\nodejs\node_modules\npm\lib\commands\run-script.js:40:7)
13 verbose stack at async Npm.exec (C:\Program Files\nodejs\node_modules\npm\lib\npm.js:207:9)
14 error code ERR_INVALID_ARG_TYPE
15 error The "file" argument must be of type string. Received undefined
16 verbose cwd C:\Users\ny090\OneDrive\デスクトップ\react\real-time-communication-app
17 verbose os Windows_NT 10.0.26100
18 verbose node v22.14.0
19 verbose npm v10.9.2
20 verbose exit 1
21 verbose code 1
22 error A complete log of this run can be found in: C:\Users\ny090\AppData\Local\npm-cache\_logs\2025-03-12T13_13_59_560Z-debug-0.log
0