yoavbls / pretty-ts-errors

šŸ”µ Make TypeScript errors prettier and human-readable in VSCode šŸŽ€
https://marketplace.visualstudio.com/items?itemName=yoavbls.pretty-ts-errors
MIT License
13.14k stars 89 forks source link

Cloning the repo and running the test suite fails to download vscode #98

Closed kevinramharak closed 3 months ago

kevinramharak commented 4 months ago

I checked out the repo locally and used npm ci to install the packages from the package-lock.json. I ran npm run test in the command line, it fails with the following output:

$ npm run test

> pretty-ts-errors@0.5.3 pretest
> npm run compile-tests && npm run compile && npm run lint

> pretty-ts-errors@0.5.3 compile-tests
> tsc -p . --outDir out

> pretty-ts-errors@0.5.3 compile
> node scripts/build

> pretty-ts-errors@0.5.3 lint
> eslint src --ext ts & tsc --noEmit

> pretty-ts-errors@0.5.3 test
> node ./out/test/runTest.js

Downloading VS Code 1.87.2 from https://update.code.visualstudio.com/1.87.2/win32-x64-archive/stable
gzip: stdin has more than one entry--rest ignored
tar: Child died with signal 13
tar: Error is not recoverable: exiting now
node:events:491
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at afterWriteDispatched (node:internal/stream_base_commons:160:15)
    at writeGeneric (node:internal/stream_base_commons:151:3)
    at Socket._writeGeneric (node:net:930:11)
    at Socket._write (node:net:942:8)
    at doWrite (node:internal/streams/writable:411:12)
    at clearBuffer (node:internal/streams/writable:572:7)
    at onwrite (node:internal/streams/writable:464:7)
    at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:106:10)
Emitted 'error' event on Socket instance at:
    at Socket.onerror (node:internal/streams/readable:785:14)
    at Socket.emit (node:events:513:28)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -4047,
  code: 'EPIPE',
  syscall: 'write'
}

I tried this both on node 20 and 18. Looking at https://github.com/microsoft/vscode-test/issues they suggest updating to the latest version.

I checked the package-lock.json and noticed it is locked at 2.3.3. When I updated the package to 2.3.9 the test suite runs and succeeds as expected.

I will add an PR with the fix.