I did composer create-project laravel/laravel Push "8.0"
In blog file do.
composer require laravel/ui
php artisan ui bootstrap
php artisan ui vue --auth
Then change package.json file to : https://github.com/laravel/laravel/blob/8.x/package.json#L12
Then do npm install --save-dev cross-env
npm install vue
Second do npm install&&npm run dev
chenasmartin@MacBook-Air-von-Chenas Push % npm install&&npm run dev
up to date, audited 788 packages in 736ms
81 packages are looking for funding
run npm fund
for details
found 0 vulnerabilities
dev npm run development
development mix
✖ Mix Compiled with some errors in 785.65ms
WARNING in ./resources/js/bootstrap.js 4:2-22 Module not found: Error: Can't resolve 'bootstrap' in '/Applications/XAMPP/xamppfiles/htdocs/Push/resources/js' Did you mean './bootstrap'? Requests that should resolve in the current directory need to start with './'. Requests that start with a name are treated as module requests and resolve within module directories (node_modules). If changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory too.
ERROR in ./resources/sass/app.scss Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js): ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js): SassError: Can't find stylesheet to import. ╷ 8 │ @import '~bootstrap/scss/bootstrap'; │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ╵ resources/sass/app.scss 8:9 root stylesheet at processResult (/Applications/XAMPP/xamppfiles/htdocs/Push/node_modules/webpack/lib/NormalModule.js:751:19) at /Applications/XAMPP/xamppfiles/htdocs/Push/node_modules/webpack/lib/NormalModule.js:853:5 at /Applications/XAMPP/xamppfiles/htdocs/Push/node_modules/loader-runner/lib/LoaderRunner.js:399:11 at /Applications/XAMPP/xamppfiles/htdocs/Push/node_modules/loader-runner/lib/LoaderRunner.js:251:18 at context.callback (/Applications/XAMPP/xamppfiles/htdocs/Push/node_modules/loader-runner/lib/LoaderRunner.js:124:13) at /Applications/XAMPP/xamppfiles/htdocs/Push/node_modules/sass-loader/dist/index.js:54:7 at Function.call$2 (/Applications/XAMPP/xamppfiles/htdocs/Push/node_modules/sass/sass.dart.js:98905:16) at render_closure1.call$2 (/Applications/XAMPP/xamppfiles/htdocs/Push/node_modules/sass/sass.dart.js:84431:12) at _RootZone.runBinary$3$3 (/Applications/XAMPP/xamppfiles/htdocs/Push/node_modules/sass/sass.dart.js:29484:18) at _FutureListener.handleError$1 (/Applications/XAMPP/xamppfiles/htdocs/Push/node_modules/sass/sass.dart.js:28006:21) at _Future__propagateToListeners_handleError.call$0 (/Applications/XAMPP/xamppfiles/htdocs/Push/node_modules/sass/sass.dart.js:28313:49) at Object._Future__propagateToListeners (/Applications/XAMPP/xamppfiles/htdocs/Push/node_modules/sass/sass.dart.js:3896:77) at _Future._completeError$2 (/Applications/XAMPP/xamppfiles/htdocs/Push/node_modules/sass/sass.dart.js:28159:9) at _AsyncAwaitCompleter.completeError$2 (/Applications/XAMPP/xamppfiles/htdocs/Push/node_modules/sass/sass.dart.js:27807:12) at Object._asyncRethrow (/Applications/XAMPP/xamppfiles/htdocs/Push/node_modules/sass/sass.dart.js:3699:17) at /Applications/XAMPP/xamppfiles/htdocs/Push/node_modules/sass/sass.dart.js:19760:20
1 ERROR in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details) webpack compiled with 2 errors and 1 warning
How can i fix that
CodePudding user response:
Try to install bootstrap manually with npm so you run the following command:
npm install bootstrap
If this not work, you can manually switch back to node-sass,
Run the following command to install the node-sass dependencies:
npm install node-sass
Now change the following code :
mix.sass('resources/sass/app.sass', 'public/css', {
implementation: require('node-sass')
});
CodePudding user response:
Delete your node_modules
folder and retry to run :
npm install