Autour de Laravel

Unable to locate Mix file: /css/app.css

Avatar de RyanKeli
RyanKeli

Bonjour ici. depuis quelques temps je cherche une solution pour un problème que me cause la commande : npm run dev. En effet, le code :

mix.js('resources/js/app.js', 'public/js').vue() .sass('resources/sass/app.scss', 'public/css') .webpackConfig(require('./webpack.config'));

ne génère pas les fichiers css dans le repertoire public/css et me renvoie cette erreur dans le terminal :

@ dev C:\laragon\www\smg npm run development

@ development C:\laragon\www\smg mix

× Mix Compiled with some errors in 14.32s

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 (C:\laragon\www\smg\node_modules\tailwindcss\lib\lib\setupTrackingContext.js:85:63) at C:\laragon\www\smg\node_modules\tailwindcss\lib\lib\setupTrackingContext.js:97:92 at C:\laragon\www\smg\node_modules\tailwindcss\lib\processTailwindFeatures.js:46:11 at plugins (C:\laragon\www\smg\node_modules\tailwindcss\lib\plugin.js:38:63) at LazyResult.runOnRoot (C:\laragon\www\smg\node_modules\postcss\lib\lazy-result.js:339:16) at LazyResult.runAsync (C:\laragon\www\smg\node_modules\postcss\lib\lazy-result.js:393:26) at LazyResult.async (C:\laragon\www\smg\node_modules\postcss\lib\lazy-result.js:221:30) at LazyResult.then (C:\laragon\www\smg\node_modules\postcss\lib\lazy-result.js:206:17) at processResult (C:\laragon\www\smg\node_modules\webpack\lib\NormalModule.js:760:19) at C:\laragon\www\smg\node_modules\webpack\lib\NormalModule.js:862:5 at C:\laragon\www\smg\node_modules\loader-runner\lib\LoaderRunner.js:400:11 at C:\laragon\www\smg\node_modules\loader-runner\lib\LoaderRunner.js:252:18 at context.callback (C:\laragon\www\smg\node_modules\loader-runner\lib\LoaderRunner.js:124:13) at Object.loader (C:\laragon\www\smg\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! C:\Users\pc\AppData\Roaming\npm-cache_logs\2023-03-20T19_55_37_720Z-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\pc\AppData\Roaming\npm-cache_logs\2023-03-20T19_55_37_848Z-debug.log

Veuillez m'aider svp. Je vous remercie. J'utilise Laravel 8, php7.4, node 12.14

Posté il y a 6 mois
Avatar de ObbySidaneY
ObbySidaneY

Hello il me semble que tu n'as pas genere la config de tailwindcss. Tu pourras executer cette commande npx tailwindcss init Pour plus de precision, je te recommande ce lien sur la doc de tailwind pour la configuration https://tailwindcss.com/docs/configuration

Posté il y a 5 mois

Vous ne pouvez pas répondre à ce sujet.