Home > Back-end >  ng serve command suddenly stopped working
ng serve command suddenly stopped working

Time:10-21

I've got this angular (12.2.12) app. Everything was working fine until today. When i tried ng serve --live-reload=false the process just failed. Browser application bundle generation completed successfully but right after that i've got this error message:

× 「wdm」: Error: invalid argument
    at pathToArray (app_path\node_modules\memory-fs\lib\MemoryFileSystem.js:44:10)
    at MemoryFileSystem.readdirSync (app_path\node_modules\memory-fs\lib\MemoryFileSystem.js:122:13)
    at MemoryFileSystem.<computed> [as readdir] (app_path\node_modules\memory-fs\lib\MemoryFileSystem.js:279:34)
    at app_path\node_modules\webpack\lib\CleanPlugin.js:65:7     
    at symbolIterator (app_path\node_modules\neo-async\async.js:3482:9)
    at timesSync (app_path\node_modules\neo-async\async.js:2297:7)
    at Object.eachLimit (app_path\node_modules\neo-async\async.js:3463:5)
    at getDiffToFs (app_path\node_modules\webpack\lib\CleanPlugin.js:61:11)
    at app_path\node_modules\webpack\lib\CleanPlugin.js:352:6    
    at Hook.eval [as callAsync] (eval at create (app_path\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:12:1)

I didn't change anything beisdes changing value for build / outputPath in angular.json (changing it back to previous value did not help to solve the problem). Any ideas what may be the problem?

One more thing: ng build works without any problems

CodePudding user response:

Ok i apologize even tho i said i changed the outputPath back to it's previous value the opposite was true and i did not save the angular.json after changing it back.

Changing the value back and saving angular.json did actually resolve the issue. The problem happened because i changed the value of outputPath to shared network folder. This change caused ng serve to stop working.

(Not sure wheather to delete the question or keep it up with this answer)

  • Related