jetstrap
jetstrap copied to clipboard
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
To Reproduce Hi, I'm installing laravel 8 and try to swap the jetstream from tailwind to bootstrap, but when I run 'npm run dev', it produce these errors
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/postcss-loader/dist/cjs.js):
TypeError: Cannot read property 'config' of undefined
at getTailwindConfig (/projects/la/backoffice/node_modules/tailwindcss/lib/lib/setupTrackingContext.js:87:63)
at /projects/la/backoffice/node_modules/tailwindcss/lib/lib/setupTrackingContext.js:129:92
at /projects/la/backoffice/node_modules/tailwindcss/lib/processTailwindFeatures.js:46:11
at plugins (/projects/la/backoffice/node_modules/tailwindcss/lib/index.js:33:63)
at LazyResult.runOnRoot (/projects/la/backoffice/node_modules/postcss/lib/lazy-result.js:339:16)
at LazyResult.runAsync (/projects/la/backoffice/node_modules/postcss/lib/lazy-result.js:393:26)
at LazyResult.async (/projects/la/backoffice/node_modules/postcss/lib/lazy-result.js:221:30)
at LazyResult.then (/projects/la/backoffice/node_modules/postcss/lib/lazy-result.js:206:17)
at processResult (/projects/la/backoffice/node_modules/webpack/lib/NormalModule.js:758:19)
at /projects/la/backoffice/node_modules/webpack/lib/NormalModule.js:860:5
at /projects/la/backoffice/node_modules/loader-runner/lib/LoaderRunner.js:400:11
at /projects/la/backoffice/node_modules/loader-runner/lib/LoaderRunner.js:252:18
at context.callback (/projects/la/backoffice/node_modules/loader-runner/lib/LoaderRunner.js:124:13)
at Object.loader (/projects/la/backoffice/node_modules/postcss-loader/dist/index.js:142:7)
1 ERROR in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)
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! /home/xdemia/.npm/_logs/2022-08-03T08_58_48_872Z-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! /home/xdemia/.npm/_logs/2022-08-03T08_58_48_981Z-debug.log
this is my package version
"php": "^7.3|^8.0",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^8.75",
"laravel/jetstream": "^2.9",
"laravel/sanctum": "^2.11",
"laravel/tinker": "^2.5",
"livewire/livewire": "^2.5"
The color-adjust shorthand is currently deprecated and it depends on the [email protected]
I was able to fix this by reverting the autoprefixer package as well as @Benno to version 10.4.5. Run this: npm install [email protected] --save-exact
thanks @yalcincoruh , but it not work for me, I still get the same issue after running npm install [email protected] --save-exact
It's trying to find the tailwind config file. Create an empty file called tailwind.config.js
at the root of your Laravel project.
but tailwind.config.js is already exists
There are alternative solutions at this address : https://stackoverflow.com/questions/72083968/1-warning-in-child-compilations-use-stats-children-true-resp-stats-child
in the package.json file "autoprefixer": "^10.4.5", edit your line like this and do npm install again
I also had the same error
i have the same problem