laravel 8 bootstrap не компилируется
скачал архив с файлами bootstap 5 кинул resources/css/bootstrap.css и в resources/js/bootstrap.js
css скомпилировался а js нет
ERROR in ./resources/js/bootstrap.js 59:141-166 Module not found: Error: Can't resolve '@popperjs/core' in 'W:\domains\da-kak-syka\syka\resources\js'
ERROR in ./resources/js/bootstrap.js Module not found: Error: Can't resolve '@popperjs/core' in 'W:\domains\da-kak-syka\syka\resources\js'
webpack compiled with 2 errors
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\РОМАН\AppData\Roaming\npm-cache_logs\2021-05-16T12_27_22_995Z-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\РОМАН\AppData\Roaming\npm-cache_logs\2021-05-16T12_27_23_063Z-debug.log PS W:\domains\da-kak-syka\syka>
webpack.mix.js
const mix = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel applications. By default, we are compiling the CSS
| file for the application as well as bundling up all the JS files.
|
*/
mix.js('resources/js/app.js', 'public/js')
.postCss('resources/css/app.css', 'public/css', [
//
]);
mix.copyDirectory('resources/img', 'public/img');
app.js
require('./bootstrap');
Ответы (1 шт):
npm i @popperjs/core --save-dev
у меня все заработало ответ нашел на англ stackoverflow