Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ali15_2010's avatar

ERROR in child compilations

Hi, I after run this code npm run dev give me error.

ERROR in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)

for fix it search anyone who this problem but not helpful. for fix it i remove node.js and reinstall it and reset everything by default. before it i always use 'npm run dev' and not give me error.

full text error:

 @ dev D:\wamp64\www\Laravel
 npm run development        


 @ development D:\wamp64\www\Laravel
 mix


× Mix
  Compiled with some errors in 3.21s

ERROR in ./resources/css/app.css
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/css-loader/dist/cjs.js):
ValidationError: Invalid options object. CSS Loader has been initialized using an options object that does not match the API schema.
 - options.url should be one of these:
   boolean | object { filter? }
   -> Allows to enables/disables `url()`/`image-set()` functions handling.
   -> Read more at https://github.com/webpack-contrib/css-loader#url
   Details:
    * options.url should be a boolean.
    * options.url should be an object:
      object { filter? }
    at validate (D:\wamp64\www\Laravel\node_modules\webpack\node_modules\schema-utils\dist\validate.js:105:11)
    at Object.getOptions (D:\wamp64\www\Laravel\node_modules\webpack\lib\NormalModule.js:529:19)   
    at Object.loader (D:\wamp64\www\Laravel\node_modules\css-loader\dist\index.js:31:27)
    at processResult (D:\wamp64\www\Laravel\node_modules\webpack\lib\NormalModule.js:703:19)       
    at D:\wamp64\www\Laravel\node_modules\webpack\lib\NormalModule.js:809:5
    at D:\wamp64\www\Laravel\node_modules\loader-runner\lib\LoaderRunner.js:399:11
    at D:\wamp64\www\Laravel\node_modules\loader-runner\lib\LoaderRunner.js:251:18

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\ali17\AppData\Roaming\npm-cache\_logs21-07-22T19_52_18_824Z-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:

0 likes
4 replies
Brian Kidd's avatar

Have you tried deleting node_modules folder and then npm install?

1 like
ali15_2010's avatar

not yet, i try it and give me this error

 @ dev D:\wamp64\www\Laravel
 npm run development        

 @ development D:\wamp64\www\Laravel
 mix

'mix' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ development: `mix`
npm ERR! Exit status 1
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\ali17\AppData\Roaming\npm-cache\_logs21-07-22T20_36_00_213Z-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\ali17\AppData\Roaming\npm-cache\_logs21-07-22T20_36_00_256Z-debug.log     
PS D:\wamp64\www\Laravel> npm run watch
@ watch D:\wamp64\www\Laravel
mix watch

'mix' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ watch: `mix watch`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ watch script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 

ali15_2010's avatar

and search for this problem and find this command :

npm install laravel-mix@latest --save-dev

and run npm run dev again give me first error.

ali15_2010's avatar

when i comment this lines in webpack.mix.js, i have no error.

const mix = require('laravel-mix');

const tailwindcss = require('tailwindcss');

mix.js('resources/js/app.js', 'public/js');

    // .postCss('resources/css/app.css', 'public/css', [

    //     require('tailwindcss'),

    // ]);

Compiled Successufuly Text:

@ dev D:\wamp64\www\Laravel
npm run development


@ development D:\wamp64\www\Laravel
mix


* Mix █████████████████████████ emitting (98%)
 after emit




√ Mix
  Compiled successfully in 609.48ms

   Laravel Mix v6.0.25   


✔ Compiled Successfully in 570ms
┌───────────────────────────────────────────────────────────────────────────────────────┬─────────┐│                                                                                  File │ Size    │├───────────────────────────────────────────────────────────────────────────────────────┼─────────┤│                                                                            /js/app.js │ 592 KiB │└───────────────────────────────────────────────────────────────────────────────────────┴─────────┘

webpack compiled successfully.

Please or to participate in this conversation.