Reputation: 2624
In a new Laravel install I get the following error when I run npm run dev
: Module not found: Error: Can't resolve 'bootstrap' in 'path/here/resources/js'
In my package.json
under devDependencies
I have "bootstrap": "^4.0.0"
and I haven't edited anything.
Original Laravel bootstrap.js (this is Laravel's own bootstrap file, not the one from getbootstrap.com) can be found here.
Upvotes: 1
Views: 5008
Reputation: 3493
Laravel has removed Ui prerequisites from the framework.
The Bootstrap, React Vue scaffolding provided by Laravel is located in the laravel/ui
Composer package, which may be installed using Composer:
composer require laravel/ui
Once the laravel/ui package has been installed, you may install the frontend scaffolding using the ui Artisan command:
php artisan ui bootstrap
php artisan ui vue
php artisan ui react
// Generate login / registration scaffolding...
php artisan ui bootstrap --auth
php artisan ui vue --auth
php artisan ui react --auth
now you can use npm i
;-).
Upvotes: 2