Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project fails to build at typechecking stage with 1.6.0 and 2.0.0-beta.10 #5923

Open
chrisbenincasa opened this issue Jun 19, 2024 · 2 comments
Labels

Comments

@chrisbenincasa
Copy link

Describe the bug

Build fails with Typescript 5.4.3, Node 20.11.1

@tunarr/server:typecheck: ../node_modules/.pnpm/vite-node@2.0.0-beta.10_@types+node@20.11.1/node_modules/vite-node/dist/index-D1EszD4V.d.ts:87:14 - error TS2304: Cannot find name 'WebSocket'.
@tunarr/server:typecheck:
@tunarr/server:typecheck: 87   webSocket: WebSocket
@tunarr/server:typecheck:                 ~~~~~~~~~
@tunarr/server:typecheck:
@tunarr/server:typecheck: ../node_modules/.pnpm/vite@5.0.11_@types+node@20.11.1/node_modules/vite/types/customEvent.d.ts:26:14 - error TS2304: Cannot find name 'WebSocket'.
@tunarr/server:typecheck:
@tunarr/server:typecheck: 26   webSocket: WebSocket
@tunarr/server:typecheck:                 ~~~~~~~~~
@tunarr/server:typecheck:
@tunarr/server:typecheck: ../node_modules/.pnpm/vite@5.0.11_@types+node@20.11.1/node_modules/vite/types/importGlob.d.ts:36:11 - error TS2304: Cannot find name 'Worker'.
@tunarr/server:typecheck:
@tunarr/server:typecheck: 36   worker: Worker
@tunarr/server:typecheck:              ~~~~~~
@tunarr/server:typecheck:
@tunarr/server:typecheck:

skipLibCheck feels like a big hammer to drop here.

Reproduction

https://stackblitz.com/edit/vitest-dev-vitest-u7ffxn?file=package.json

Run pnpm tsc --noEmit

System Info

) ✗ pnpm envinfo --system --npmPackages '{vitest,@vitest/*,vite,@vitejs/*}' --binaries --browsers

  System:
    OS: macOS 14.5
    CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
    Memory: 69.75 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.11.1 - ~/.nvm/versions/node/v20.11.1/bin/node
    npm: 10.2.4 - ~/.nvm/versions/node/v20.11.1/bin/npm
    pnpm: 8.15.4 - ~/Library/pnpm/pnpm
  Browsers:
    Chrome: 126.0.6478.62
    Safari: 17.5
  npmPackages:
    vitest: ^2.0.0-beta.10 => 2.0.0-beta.10

NOTE I have also tried with vitest 1.6.0



### Used Package Manager

pnpm

### Validations

- [X] Follow our [Code of Conduct](https://github.com/vitest-dev/vitest/blob/main/CODE_OF_CONDUCT.md)
- [X] Read the [Contributing Guidelines](https://github.com/vitest-dev/vitest/blob/main/CONTRIBUTING.md).
- [X] Read the [docs](https://vitest.dev/guide/).
- [X] Check that there isn't [already an issue](https://github.com/vitest-dev/vitest/issues) that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vitest-dev/vitest/discussions) or join our [Discord Chat Server](https://chat.vitest.dev).
- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
@sheremet-va
Copy link
Member

This is an issue with Vite: vitejs/vite#9813

@chrisbenincasa
Copy link
Author

Ah yep. I just figured out the DOM types thing too. Hmph

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants