Hi I have this folders in my project But When I run I get this error
Any idea please?
regards
Rerunning ng serve
should help fix the issue. You must have added empleado.ts
while the local server was still running, hence Angular would not have seen the file.
Thanks to @Hisham Afzal Ahamed for the solution (stopping and re-starting the Angular compiler).
CTRL-C, CTRL-C
(or CTRL-C
then Y
)ng serve
(or whatever else you're using e.g. a custom npm
script)Basically the Angular CLI sometimes doesn’t ‘see’ files that have been pulled in (e.g. when doing a merge while your compiler is running). Very useful to know. As a general time saver, If you’re pulling files into your solution or doing something similar, or you get an Angular compiler error that makes no sense, or you've made significant changes somehow, it’s always worth stopping then restarting the compiler to do a fresh build - it can save so many headaches!
When application is running state and at that if you add a file with some export class then it through this type error
ERROR in Source file not found: '/C/abc/xyz/pqr/apps/src/app/comm/ab.ts'.
Solution
restart application again then it works.
By using
npm start
command
After execute npm start again all works fine Thanks
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With