Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Neeraj1005's avatar

bootstrap5 ERROR in ./node_modules/bootstrap/dist/js/bootstrap.esm.js 6:0-41

ERROR in ./node_modules/bootstrap/dist/js/bootstrap.esm.js 6:0-41
Module not found: Error: Can't resolve '@popperjs/core' in 'C:\laragon\www\tasky\node_modules\bootstrap\dist\js'

webpack compiled with 1 error
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ development: `mix`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ development script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Nick\AppData\Roaming\npm-cache\_logs21-01-23T14_13_45_627Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ dev: `npm run development`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Nick\AppData\Roaming\npm-cache\_logs21-01-23T14_13_45_776Z-debug.log

I installed fresh laravel project with laravel/ui package. And I installed new bootstrap5 for this project but when I tried to run npm run dev command this send the error. can anyone know how to install bootsrap 5 in laravel 8?

0 likes
6 replies
devingray_'s avatar

Please accept the answer to help others find the solution if they come across this error

1 like

Please or to participate in this conversation.