0

When I change a file in my angular application it sends error:

ERROR in ./src/app/@theme/components/auth/index.js Module build failed: Error: ENOENT: no such file or directory, open 'C:\Dev\Ng\ngx-admin\src\app\@theme\components\auth\index.js' i 「wdm」: Failed to compile.

And when I terminate the ng serve and re run, it is correct.

I dont want to re run it again.

What should I do to fix it?

Kalamarico
  • 5,466
  • 22
  • 53
  • 70

1 Answers1

0

Angular CLI cannot actually see files that you add when the server is running.

So it is better to give a fresh build by command.

CTRL C

ng serve -o 

A similar question was asked here it will help to solve your doubt:

Source File Not Found in Angular CLI project

wins999
  • 1,432
  • 1
  • 9
  • 10