protobuf.js
protobuf.js copied to clipboard
npm ERR! The "file" argument must be of type string
protobuf.js version: v7.2.5 node version: v18.17.1 npm version: v10.1.0
I'm trying to install protobuf using "npm install protobufjs" and it gives this error:
npm ERR! code ERR_INVALID_ARG_TYPE
npm ERR! The "file" argument must be of type string. Received undefined
Log
297 info run [email protected] postinstall node_modules/protobufjs node scripts/postinstall
298 info run [email protected] postinstall { code: undefined, signal: undefined }
299 verbose stack TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received undefined
299 verbose stack at new NodeError (node:internal/errors:405:5)
299 verbose stack at validateString (node:internal/validators:162:11)
299 verbose stack at normalizeSpawnArguments (node:child_process:545:3)
299 verbose stack at spawn (node:child_process:750:13)
299 verbose stack at C:\Users\Admin\AppData\Roaming\nvm\v18.17.1\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:18:12
299 verbose stack at new Promise (<anonymous>)
299 verbose stack at promiseSpawn (C:\Users\Admin\AppData\Roaming\nvm\v18.17.1\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:17:13)
299 verbose stack at spawnWithShell (C:\Users\Admin\AppData\Roaming\nvm\v18.17.1\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:123:10)
299 verbose stack at promiseSpawn (C:\Users\Admin\AppData\Roaming\nvm\v18.17.1\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:12:12)
299 verbose stack at runScriptPkg (C:\Users\Admin\AppData\Roaming\nvm\v18.17.1\node_modules\npm\node_modules\@npmcli\run-script\lib\run-script-pkg.js:79:13)