Daniel
Daniel5w ago

Typescript errors on Vite Quickstart

I get the following errors from the vite quickstart. Is this expected?
8 Replies
sshader
sshader5w ago
Is this from npm create convex@latest? Or something else? Since these mostly look like errors in node_modules, there is skipLibCheck: true which you can set in your tsconfig.json to basically just ignore them (but still typecheck your source code)
Daniel
DanielOP5w ago
yes. However, I gave it a second try and now things are working. I'm not sure what I did differently this time, but it was something like npm create convex@latest followed by npx convex dev followed by npm run dev I was a bit confused about the need for npx convex dev because the quickstart CLI itself doesn't seem to mention it, it directs you straight to npm run dev. I think similar comments were made here: https://discord.com/channels/1019350475847499849/1285192598985769020 Anyways, for now I think I'm good 🙂 Thank you! Oh, ok I see - I had move all the files from the original directory up one directory. I just did that again and it caused the same error. Seems like I need to run npx convex dev in the directory again after moving the files. Do you know why that might be?
ballingt
ballingt5w ago
Which files? The entire project?
Daniel
DanielOP4w ago
Yes, I just grabbed everything in VSCode and moved it up a directory.
ballingt
ballingt4w ago
I still don't quite understand, what did your project look like before and after this? Typically folks open VSCode at the root of their project, so it's not possible to move the whole project up a level. Is this in a monorepo, or do you open VScode in a different directory as your project? Would love to know what the project looked like before you did this and after
Daniel
DanielOP4w ago
Oh yeah, I guess this is my normal flow for starter kit type projects (possibly there are better ways): 1. Clone my own empty git repo 2. From there, npm create … 3. Go with default folder name “my-app” 4. Now move all the contents of my-app up a level, delete the empty directory. I happen to do that operation in vscode (opening one level up) So that the starter code is now at the top level of the previously empty directory that I recently cloned
ballingt
ballingt4w ago
Ah got it, huh I don't know regenerating would be required if relative paths are the same! Not at all computer to try to repro yet, I can try these steps later
erquhart
erquhart4w ago
Just tried this and everything worked okay - create new dir - git init - npm create convex@latest (default answers, no auth) - wait - in VSCode sidebar select all contents of my-app and drag out to parent folder - when asked to update imports of node_modules, say no - npx convex dev And while this should definitely work for you and is worth addressing, I do wonder why you don't use "." when asked the project name, so it just uses your existing directory. Curious if there's a specific goal for your approach

Did you find this page helpful?