0

I have just update my angular project to angular 8 (using angular cli 8.3.20). When I try to run "ng build" it appears this king of error for multiple files but I am sure that the casing in my project is correct!

I don't know how to figured out this!

Here a screenshot of some of the multiple errors (all of the same kind)

https://i.stack.imgur.com/a86CN.png

harkesh kumar
  • 833
  • 2
  • 13
  • 35
Dangrad
  • 1
  • 1
  • 2
  • please provide your step that you use to from which version which one – harkesh kumar Dec 18 '19 at 18:28
  • Are you using Windows? we had issues in the past with Windows and Git causing casing issues. – Brian Davis Dec 18 '19 at 18:31
  • I am using mac os, for passing from 7 to 8 I have followed the first answer of this post https://stackoverflow.com/questions/56650590/ng-serve-is-not-working-after-angular-8-update – Dangrad Dec 18 '19 at 20:44

1 Answers1

-1

The issue is some of the file names and imports are not using same casing

For example

your file name is like my-service.ts

and you imported it like

import {MyService} from './services/My-service';

For example your authGuard

enter image description here

Reza
  • 18,865
  • 13
  • 88
  • 163
  • I am sure that I have no files with this issue so I don't know where the errors come from – Dangrad Dec 18 '19 at 20:45
  • 1
    @Dangrad for sure you have, I found one in your screen shot – Reza Dec 18 '19 at 22:22
  • @Dangrad glad to hear it's solved, please kindly mark my post as answer, so that if somebody else has same issue then he/she will know this is the solution – Reza Dec 19 '19 at 14:15
  • This error appears after renaming a file although you have the correct import, see: https://github.com/microsoft/TypeScript/issues/25460#issuecomment-526273944 – ViktorMS Jun 13 '22 at 21:09