npm ERR! Missing script: "dev" #79127
-
Hi! I'm trying to create a React project with Vite. The project folder is ready, npm installed, the package.json file is fine, and it includes the necessary lines, such as: |
Beta Was this translation helpful? Give feedback.
Replies: 10 comments 17 replies
-
@felyan I would recommend you remove your |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
I'm having the same issue but in my case, after running npm install, it is not creating the node_modules folder nor the package-lock.json file. |
Beta Was this translation helpful? Give feedback.
-
Okay, my problem was actually quite simple to resolve, because I was making a mistake. In my case I was entering the command npm create vite@latest and npm install without first entering the vite-project folder, where I should have run npm install and then npm run dev. |
Beta Was this translation helpful? Give feedback.
-
I am having the same issue with Vite and it broke my project. Some things I have done:
Whatever I do I get the following errors when trying
Help is appreciated! |
Beta Was this translation helpful? Give feedback.
-
Npm run dev returns: npm ERR! A complete log of this run can be found in: C:\Users\aidoj\AppData\Local\npm-cache_logs\2024-03-08T13_47_41_707Z-debug-0.log C:\Users\aidoj\OneDrive\Desktop\react2>` while my JSON seems correct. I am baffled.
|
Beta Was this translation helpful? Give feedback.
-
how would you get the solution because i m suffering from the same |
Beta Was this translation helpful? Give feedback.
-
Sometimes it happens due to being in the wrong directory. Ensuring to run "npm install" after modifying the package.json may help to resolve it. |
Beta Was this translation helpful? Give feedback.
If you fully followed this guide up to facing this issue. https://vitejs.dev/guide
I would recommend you reinstall your node and check all stuff after re-installation. I expected after the re-installation of your vite globally, it would work fine.