2

I have some troubles in my project angular. Who can help me ?

ERROR in src/app/app-routing.module.ts(5,1): error TS1185: Merge conflict marker encountered.

Divyanshu Srivastava
  • 1,379
  • 11
  • 24
Jimmy kalubi
  • 27
  • 1
  • 1
  • 4
  • Hmm.. Have you tried resolving the merge conflict – wentjun Jun 03 '19 at 07:14
  • 3
    Possible duplicate of [How to resolve merge conflicts in Git](https://stackoverflow.com/questions/161813/how-to-resolve-merge-conflicts-in-git) – mbojko Jun 03 '19 at 07:16
  • @wentjun @mbojko Looks like an error which is being thrown by the `TypeScript` compiler. – David R Jun 03 '19 at 07:17
  • 1
    @DavidR Yes, the reason why the TS compiler is throwing that error, is because when there are markers being inserted to the code to denote the presence of merge conflicts.. Such markers cannot be properly compiled/transpiled – wentjun Jun 03 '19 at 07:19
  • 3
    Still, I really can't imagine an answer different than "resolve the merge conflict". – mbojko Jun 03 '19 at 07:21
  • Exactly! All will be fine once the merge conflict is resolved.. – wentjun Jun 03 '19 at 07:23
  • @wentjun Got it!. – David R Jun 03 '19 at 07:25

3 Answers3

9

You possibly selected 'add routing' = yes when you first created your app in the Angular CLI, so the file app-routing.module already exists in the src/app folder.

Gini Blanco
  • 118
  • 1
  • 6
2

Just go through path that is src/app/app-routing.module.ts and delete this app-routing.module.ts file and then again install it using ng g module app-routing --flat --module=app.

Dmitry S.
  • 1,544
  • 2
  • 13
  • 22
0

Open src/app/app-routing.module.ts file in your editor and look through it. On line 5 there probably is something like <<<<<<< HEAD... Which marks where git could not automatically merge 2 branches and you need to manually edit this file and tell what does it have to look like exactly now.

In other words, remove all non-typescript code.

Harijs Deksnis
  • 1,366
  • 1
  • 13
  • 24