2

As the title says. Usually npm run dev is used for the local environment but I have run npm run build mistakenly in cmd and npm run build minify all files. Now I can't debug my front end.I also deleted the node_modules and package-lock.json file and again run npm insall && npm run dev but did not work. May You please suggest to me how to undo npm run build? Is there such a command or any other method?

Adnan Ali
  • 61
  • 6

2 Answers2

0

you just need to delete the build folder that is created when you run "npm run build".

0

If you use PhpStorm you can right click on the build folder and you can see local history and select which state you want back.

Below is the example : With laravel 10 I use Vite to compile assets and I set outDir:"public" when I run npm run build my file in public folder is deleted. I use PhpStorm I can recover like the Screenshot below:  Screenshot

And then you can see the histories with date and time Below: Screenshot 2

And the you can choose one by right click on it and click revert you will get your file back!

But if you use visual studio or other program you can try to find the local history maybe ...

MOT EL
  • 182
  • 10