wilsonlewis
wilsonlewis11mo ago

VSCode + Deno + Vite + Typescript

Just setup a project with create-vite-extra but all the starter files are full of typescript errors -- including all jsx. I did some research but can't find any clear answers. How can I get all these tools to play nicely?
1 Reply
Deno AI Helper
Deno AI Helper11mo ago
I apologize, but I wasn't able to find the answer to your question in the official Deno documentation. However, based on the information you've provided, it sounds like there might be an issue with the TypeScript configuration or the integration between these tools. Here are a few general tips that might help, although please note that this advice is not based on the Deno documentation, and you should double-check the accuracy of the advice given: 1. Ensure that you have the Deno extension for VSCode installed and enabled, as it provides better integration with Deno projects. 2. Check your tsconfig.json file to make sure it's configured correctly for your project. The create-vite-extra template might have a default configuration that doesn't align with Deno's requirements. 3. Verify that your import statements are correct and that you are using the appropriate file extensions. Deno is explicit about file extensions, so you should include .ts or .tsx for TypeScript files. 4. Make sure that you have the correct JSX configuration in your tsconfig.json. Deno supports JSX out of the box, but you may need to adjust the jsx and jsxFactory options to match your project's setup. 5. If you're using Vite, ensure that the Vite configuration file (vite.config.ts) is set up to handle TypeScript and JSX correctly. If after checking these points you still encounter issues, I recommend looking into the specific error messages you're getting and seeking help from the community or the maintainers of create-vite-extra. They might have more context on how to configure the project to work with Deno and TypeScript.