I'm trying to install packages for a work repo, however whenever I try to run the install, once it gets to the child processes (like running install scripts for a package) I get a weird spawn error. I'm assuming it's having issues running the child processes.
Some information:
- Windows machine
- Node v12.22.3 and npm v6.14.13 (I've tried node 14)
- Tried using bash, windows terminal, cmd prompt, and powershell (all with admin)
- Error code seems to be a 4058 but I'm not sure what it can't find
It was working fine just last week, now suddenly I can't get anything done. I've tried the following:
- Turning off the Work AV
- Removing
node_modulesandpackage-lock - Running
npm cache clear --forceandnpm cache verify - Uninstalling node and reinstalling
- Completely uninstalling nvm and node and reinstalling
The error I see is:
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn =
npm ERR! file =
npm ERR! path =
npm ERR! errno ENOENT
npm ERR! root@ prepare: `husky install`
npm ERR! spawn = ENOENT
npm ERR!
npm ERR! Failed at the root@ prepare script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\dhers\AppData\Roaming\npm-cache\_logs\2021-07-19T18_28_56_807Z-debug.log
Do note this is NOT a husky problem, anything that runs a child process script seems to have this error happen.
I've never seen this before and I'm unable to fix it with the googling I've done. Here is some information from the npm log:
59 silly lifecycle root@~prepare: Args: [ '-c', 'husky install' ]
60 info lifecycle root@~prepare: Failed to exec prepare script
61 silly lifecycle root@~prepare: Returned: code: -4058 signal: null
62 info lifecycle root@~prepare: Failed to exec prepare script
63 verbose stack Error: root@ prepare: `husky install`
63 verbose stack spawn = ENOENT
63 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)
63 verbose stack at onErrorNT (internal/child_process.js:470:16)
63 verbose stack at processTicksAndRejections (internal/process/task_queues.js:84:21)
64 verbose pkgid root@
65 verbose cwd C:\Users\dhers\Documents\Development\Work\seamless
66 verbose Windows_NT 10.0.19042
67 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "i"
68 verbose node v12.22.3
69 verbose npm v6.14.13
Has anyone seen this before? I'm really hoping I'm just overlooking something super simple. Any help would be appreciated because this has me halted right now.