Got this very annoying NPM issue out of nowhere, though I must say I had a few weeks break from playing with my project.
Actual version of core-js.
npm ERR! code ENOENT
npm ERR! syscall spawn bash
npm ERR! path C:\Users\User1\Documents\project11\node_modules\**@angular\cli**
npm ERR! errno -4058
npm ERR! enoent spawn bash ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
This npm ERR! errno -4058 seems to be rather common issue, but I've found no success and am getting a bit worried, I've tried all possible solutions I've found online (below)
- Delete package-lock + node modules + npm cache and then run npm install
- Use yarn instead of NPM (installation succeeds but can't run project)
- Reinstall node and npm completely
- Test with different (newest) npm & node versions
- Test building only production version
- Restart computer
- Close all vscode applications etc. that could use npm
- Run cmd as admin
- Check windows defender if it could block npm
- Make sure system32 is correctly set in env. variables
Hox, the erro says angular-cli, but if I somehow manage to get through that, it will just complain about the next library
Edit: Workaround for me seems to be to run npm in git-bash For some reason I can't use powershell nor CMD anymore to run NPM, but that's not a big issue.