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

solid-start project can't access import.meta.env #269

Closed
greg-hammond opened this issue Mar 31, 2024 · 4 comments
Closed

solid-start project can't access import.meta.env #269

greg-hammond opened this issue Mar 31, 2024 · 4 comments

Comments

@greg-hammond
Copy link

greg-hammond commented Mar 31, 2024

Attempting to access import.meta.env gives a type error: Property 'env' does not exist on type 'ImportMeta'

Per Nikhil this is an issue separate from what was fixed in #265. There is an additional fix needed related to type exports within vinxi.

Steps to repro:
pnpm create solid
pnpm install

attempt to access import.meta.env within app.tsx

@edivados
Copy link
Contributor

edivados commented Apr 7, 2024

@nksaraf Should vinxi/types/client be used instead of vinxi/client? The latter is empty and the reason it works with npm in solid-start seems to be because Ryan added vite/client to tsconfig.

@Brendonovich
Copy link
Contributor

Turns out the Vinxi docs and a lot of the examples use vinxi/types/client instead of vinxi/client. SS should probably be updated so that manually adding vite/client isn't necessary.
image

@edivados
Copy link
Contributor

Yeah. SolidStart examples have been updated some time ago to use vinxi/types/client so this should not be a problem anymore.

@greg-hammond
Copy link
Author

I'm fine to close this - it seems that usage of vinxi/types/client has percolated through the ecosystem, and this is no longer an issue.

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

No branches or pull requests

3 participants