After a long discussion [here](https://github.com/cdr/code-server/pull/4284#discussion_r719851298), we came to the realization that there's a bug inside Jest which affects our function `isNodeJSErrnoException`. ```shell $ node -e 'try { fs.readFileSync("/") } catch (error) { console.log(error instanceof Error) }' true ``` References: - https://github.com/facebook/jest/pull/8220 - https://github.com/facebook/jest/issues/11808