drehimself / laravel-ecommerce-example

Code for YouTube series on building a Laravel E-Commerce application.
https://www.youtube.com/watch?v=o5PWIuDTgxg&list=PLEhEHUEU3x5oPTli631ZX9cxl6cU_sDaR
1.02k stars 586 forks source link

Can't resolve 'bootstrap-sass' #75

Open chisumo2016 opened 4 years ago

chisumo2016 commented 4 years ago

warning in ./resources/assets/js/bootstrap.js

Module not found: Error: Can't resolve 'bootstrap-sass' in 'C:\laragon\www\laravel-ecommerce-example\resources\assets\js'

[webpack.Progress] 100%

          Asset      Size   Chunks             Chunk Names
   /css/app.css  13.1 KiB  /js/app  [emitted]  /js/app

/css/responsive.css 2.71 KiB /js/app [emitted] /js/app /js/app.js 3.15 MiB /js/app [emitted] /js/app

WARNING in ./resources/assets/js/bootstrap.js Module not found: Error: Can't resolve 'bootstrap-sass' in 'C:\laragon\www\laravel-ecommerce-example\resources\assets\js' @ ./resources/assets/js/bootstrap.js @ ./resources/assets/js/app.js @ multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss ./resources/assets/sass/responsive.scss

Also if I remove the module and re-run again , This is what I get $ npm install npm WARN deprecated extract-text-webpack-plugin@3.0.2: Deprecated. Please use https://github.com/webpack-contrib/mini-css-extract-plugin npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools. npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3. npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools. npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5

abijaK commented 2 years ago

ERROR Failed to compile with 2 errors 11:39:36

error in ./resources/sass/app.scss

Module build failed (from ./node_modules/css-loader/index.js): ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/c js.js): TypeError: this.getOptions is not a function at Object.loader (C:\laragon\www\app1\node_modules\sass-loader\dist\index .js:25:24) at C:\laragon\www\app1\node_modules\webpack\lib\NormalModule.js:316:20 at C:\laragon\www\app1\node_modules\loader-runner\lib\LoaderRunner.js:367 :11 at C:\laragon\www\app1\node_modules\loader-runner\lib\LoaderRunner.js:233 :18 at runMicrotasks () at processTicksAndRejections (node:internal/process/task_queues:96:5)

error in ./resources/sass/app.scss

Module build failed (from ./node_modules/sass-loader/dist/cjs.js): TypeError: this.getOptions is not a function at Object.loader (C:\laragon\www\app1\node_modules\sass-loader\dist\index .js:25:24)

@ ./resources/sass/app.scss 2:14-253

 Asset      Size   Chunks             Chunk Names

/js/app.js 1.15 MiB /js/app [emitted] /js/app

WARNING in ./resources/js/bootstrap.js Module not found: Error: Can't resolve 'popper.js' in 'C:\laragon\www\app1\re sources\js' @ ./resources/js/bootstrap.js @ ./resources/js/app.js @ multi ./resources/js/app.js ./resources/sass/app.scss

ERROR in ./resources/sass/app.scss Module build failed (from ./node_modules/css-loader/index.js): ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/c js.js): TypeError: this.getOptions is not a function at Object.loader (C:\laragon\www\app1\node_modules\sass-loader\dist\index .js:25:24) at C:\laragon\www\app1\node_modules\webpack\lib\NormalModule.js:316:20 at C:\laragon\www\app1\node_modules\loader-runner\lib\LoaderRunner.js:367 :11 at C:\laragon\www\app1\node_modules\loader-runner\lib\LoaderRunner.js:233 :18 at runMicrotasks () at processTicksAndRejections (node:internal/process/task_queues:96:5) @ ./resources/sass/app.scss

ERROR in ./resources/sass/app.scss (./node_modules/css-loader??ref--5-2!./nod e_modules/postcss-loader/src??postcss0!./node_modules/resolve-url-loader??ref --5-4!./node_modules/sass-loader/dist/cjs.js??ref--5-5!./resources/sass/app.s css) Module build failed (from ./node_modules/sass-loader/dist/cjs.js): TypeError: this.getOptions is not a function at Object.loader (C:\laragon\www\app1\node_modules\sass-loader\dist\index .js:25:24) @ ./resources/sass/app.scss 2:14-253

abijaK commented 2 years ago

When trying to run "npm run dev" in order to compile bootstrap in laravel 7 project, this error appeared. So, how can we solve such an issue ?