Application cannot compile after I created mime-type.validator.ts

13 views
Skip to first unread message

Partha Majumdar

unread,
Sep 26, 2018, 11:37:59 AM9/26/18
to Angular and AngularJS discussion

Dear Sir/Madam,


I created the file mime-type.validator.ts.


I am yet to use this file in my application. However, the file exists in my project.


Now, my application does not compile. I am getting the error as follows.


Failed to compile.
Source file not found: '/Users/parthamajumdar/Documents/Solutions/Paikari/pConfMan/src/app/mime-type.validator.ts'.


Earlier, I had created a .ts file as I felt I should have that. However, later I realised that I could add that function in one of my existing .ts files. So, I deleted that new .ts file. My application would not compile after that.


To solve this, I created an empty .ts file with the same name as earlier and then the application was compiling.


Request if you can provide me the solution.


Thanks and Regards,

Partha



err1.jpeg





err2.jpeg


Sander Elias

unread,
Sep 26, 2018, 12:12:19 PM9/26/18
to Angular and AngularJS discussion

Hi Partha,

Did you try restarting your build tool? Stop ng serve, delete file, and ng serve once more.
If that’s not working, it’s referenced somewhere else in your project, do a project-wide search for the file name (without .ts)

Regards
Sander

Partha Majumdar

unread,
Sep 26, 2018, 12:33:49 PM9/26/18
to Angular and AngularJS discussion
Thanks as always, Mr. Sander.

I stopped the server and deleted the file and then restarted the server. It works now.

Regards,
Partha
Reply all
Reply to author
Forward
0 new messages