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

[Bug?]: Typescript error in tsconfig.json for new projects created with pnpm. #1454

Closed
2 tasks done
HansT01 opened this issue Apr 22, 2024 · 1 comment
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@HansT01
Copy link
Contributor

HansT01 commented Apr 22, 2024

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

image

Cannot find type definition file for 'vite/client'.
  The file is in the program because:
    Entry point of type library 'vite/client' specified in compilerOptions

Expected behavior 🤔

No Typescript errors

Steps to reproduce 🕹

Steps:

  1. pnpm create solid
  2. choose any template
  3. navigate to project and pnpm install
  4. restart TS server

Context 🔦

This issue seems to have an easy fix, and it is to change the line in the tsconfig from:
"types": ["vinxi/client", "vite/client"],
to this:
"types": ["vinxi/types/client"],

This issue seems to only occur when using pnpm and not npm. I have not tested this on other machines.
I am rather new to the ecosystem. Please take the change with a grain of salt.
I found the type from vinxi's documentation: https://vinxi.vercel.app/guide/aliases.html

Your environment 🌎

No response

@HansT01 HansT01 added the bug Something isn't working label Apr 22, 2024
@ryansolid
Copy link
Member

fixed by #1455

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants