Super strange thing just happened. In the middle of my project running, it crashed and I was left with this error:
Error: EPERM: operation not permitted, uv_cwd
at process.wrappedCwd [as cwd] (node:internal/bootstrap/switches/does_own_process_state:126:28)
...
All of the files on the lefthand side of the editor disappeared. Was just weird, so I closed VS Code and navigated to the folder and used the code .
shell command to open it up again as I normally would; however, this error again.
It literally came out of nowhere - I ran my program, got up to grab my coffee, came back 2 minutes later and was left with this. I have already tried:
- Uninstalling and reinstalling VS Code
- Running
npm cache clean
with the--force
flag.
No luck though. Anyone have any ideas? I can't find anything online.
Edit:
It's happening again. I'm once again trying to run code .
within a project's directory in order to open it in VSCode. Here's the error's full stack trace:
Error: EPERM: operation not permitted, uv_cwd
at process.wrappedCwd [as cwd] (node:internal/bootstrap/switches/does_own_process_state:126:28)
at setupCurrentWorkingDirectory (/Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-node.js:1:155)
at Object.<anonymous> (/Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-node.js:1:260)
at Module._compile (node:internal/modules/cjs/loader:1163:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1216:10)
at Module.load (node:internal/modules/cjs/loader:1035:32)
at Module._load (node:internal/modules/cjs/loader:876:12)
at Function.c._load (node:electron/js2c/asar_bundle:5:13343)
at Module.require (node:internal/modules/cjs/loader:1059:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/Applications/Visual Studio Code.app/Contents/Resources/app/out/cli.js:1:97)
at Module._compile (node:internal/modules/cjs/loader:1163:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1216:10)
at Module.load (node:internal/modules/cjs/loader:1035:32)
at Module._load (node:internal/modules/cjs/loader:876:12)
at Function.c._load (node:electron/js2c/asar_bundle:5:13343)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:17:47 {
errno: -1,
code: 'EPERM',
syscall: 'uv_cwd'
}
The project's folder (foo-bar
) lives in a folder called (let's say) FizzBuzz
on my desktop. From my desktop, I can run code FizzBuzz/foo-bar
and it'll open the project just file. The error above occurs when I try to run cd FizzBuzz/foo-bar && code .