eskimo
eskimo

Reputation: 2624

Laravel: Module not found: Error: Can't resolve 'bootstrap' in

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

Answers (2)

Morteza Negahi
Morteza Negahi

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

a3rxander
a3rxander

Reputation: 906

reinstall bootstrap

npm install bootstrap

Upvotes: 2

Related Questions