0

I'm beginning to learn Laravel, so my experience and understanding of the Laravel ecosystem is low, at this time of writing.

I am following the Laravel Jetstream 3.x Installation docs, which states:

You may use Composer to install Jetstream into your new Laravel project:

composer require laravel/jetstream

After installing the Jetstream package, you may execute the jetstream:install Artisan command.

I have a newly created project, contained in ~/projects/work/jewelry, I created this with:

mkdir jewelry
cd jewelry
composer require laravel/jetstream

I try to run the Artisan command, as the docs state: php artisan laravel:jetstream

But I get the error message: Could not open input file: artisan

My thought process was that... maybe I need to install the Laravel framework first, because that's where I remember the artisan command residing? But in the docs there's this big old red warning box:

New Applications Only

Jetstream should only be installed into new Laravel applications. Attempting to install Jetstream into an existing Laravel application will result in unexpected behavior and issues.

So, I'm led to believe that I shouldn't install the Laravel framework prior to installing Jetstream. Yet, I'm no closer to understanding how to use the artisan command from inside a Jetstream project.

What am I misunderstanding?

Addendum: I tried doing composer create-project laravel/jetstream jewelry as well, to see if maybe creating the project would make a difference, and while this seems closer to what I want, the artisan command still isn't present, I still receive the error Could not open input file: artisan.

Tiffany
  • 680
  • 1
  • 15
  • 31

1 Answers1

0

So, I do need to create a Laravel project beforehand.

The solution is

cd ..
rm -r jewelry
composer create-project laravel/laravel jewelry
cd jewelry
composer require laravel/jetstream

From then, I am able to run php artisan jetstream:install inertia.

Tiffany
  • 680
  • 1
  • 15
  • 31