I fixed it by compiling in a real terminal. VS Code's terminal is apparently sandboxed and that caused an error when compiling using it.