Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to undo Inertia.js from my Laravel application

I have a problem with undoing Inertia.js in my application. When I started my application, I accidentally typed both commands.

php artisan jetstream:install inertia --teams

After a while when I saw that Livewire would be more suitable for my project.

php artisan jetstream:install livewire --teams

I tried to delete all my Inertia.js components, but my npm watch will output errors. I am wondering what I should do to undo Inertia.js from my project completely?

like image 319
Domzi27 Avatar asked Nov 01 '20 16:11

Domzi27


People also ask

How do you reset inertia form?

To reset the form values back to their default values, you can use the reset() method. If your form's default values become outdated, you can use the defaults() method to update them. This way, the next time the reset() method is used, the form will be reset to the correct values.

What is inertia JS Laravel?

Inertia.js - The Modern Monolith. Build single-page apps, without building an API. Inertia.js lets you quickly build modern single-page React, Vue and Svelte apps using classic server-side routing and controllers.

Is inertia JS any good?

I think Inertia. js provides a really good way to build JavaScript heavy web applications. It brings the goodies of your JavaScript framework of choice without the drawbacks of having to do an API or a GraphQL layer to feed it.


1 Answers

The way I see it you have 3 options:

  1. Start over. Reinstall Laravel and be sure you are installing ONLY the version you want.
  2. If you used a version control system, revert and then go from there.
  3. If you didn't use something like git, you could try deleting node_modules from your project, removing all the inertia packages, removing the auth scaffolding, dump the autoload, and try to reinstall without those packages. But again, that's a LOT of work for hopes and dreams. See 1 or 2.

You're so early on in the project that it makes the most sense. If you want to copy your controllers and views you want to save to another folder before starting over, there you go.

like image 71
mcadio Avatar answered Oct 18 '22 22:10

mcadio