Search code examples
npmlaravel-8laravel-livewireinertiajslaravel-jetstream

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?


Solution

  • 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.