Hi I have this folders in my project But When I run I get this error
Any idea please?
regards
I have seen this error with the verifications of Angular 4 onwards.
You can solve this error like this.
ng serve
or npm start
);Simplest Solution:
I also had the same issue,
The file was present in the directory but it was showing the above error.
Everything was proper but the error was not going.
then I closed the tab and again went to the directory through command prompt and again started the server:
ng serve --open
The error went !!!
i also get this error
export class Product {
constructor(
public productname: string,
public qty: string,
public price:string
) { }
} this my product.ts file
solution:
the error is that i have written productname as product-name or product_name this both things are not allowed so i hope this will help you
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
The error suggest that "source file not found".
This same error I was also getting. In my case by mistake I created a .ts file while ng server was running. The file was not needed so deleted it, from that point I stared getting the error.
I restore the file again without any code and the error is gone now.
After execute npm start again all works fine Thanks