Error when git cloning a React & Vite & Typescript repo

Hi! So I tried to import this project that uses React, Vite and TS, but when I do I get this error everywhere and when I try to run the npm run dev command, it doesn't work properly... Does anyone know how to fix this issue? Thank you!
No description
8 Replies
ἔρως
ἔρως4mo ago
in your package.json, in the "scripts" key, you dont have the "dev" key you need to check what the project has in that file
missymae
missymae4mo ago
Have you installed dependencies?
ἔρως
ἔρως4mo ago
i dont think he did
StarPlatinumSan
StarPlatinumSanOP4mo ago
do you mean like doing ''npm create vite@latest'' and all? if so, why would I need to do it again to clone a repo, cuz I did it when I first created the project on my other machine the thing is that everything works fine on the original machine I created the app, but not on this one
ἔρως
ἔρως4mo ago
you have to install all dependencies in the package.json, in ALL machines also, the package.json has to be in the repo
StarPlatinumSan
StarPlatinumSanOP4mo ago
ohh so if I add the package.json on github, then I won't need to install the dependencies? because if I do install them each time, I'd have to go through the process, then delete every file except the package.json and THEN clone the repo if it still works
StarPlatinumSan
StarPlatinumSanOP4mo ago
okay so what I did was the following: clone the repo open my console npm create vite@latest then targetted the folder I cloned from github they told me it wasn't empty and I said to ignore its content, and it downloaded the node_modules, but it also added all the useless startup classes so now I have to delete the dupes
No description
StarPlatinumSan
StarPlatinumSanOP4mo ago
is that really the regular way of doing it? why cant i just remove node_modules from git ignore and push on github the modules?
Want results from more Discord servers?
Add your server