Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

280
Visualizações
Merge conflict marker encountered

SourceTree Merge Conflict

I have created a local "Test" branch in SourceTree for testing some new features and everything seemed to work fine. Then I merged the "master" branch into my local "Test" branch and unfortunately, pushed it. But since then by running "ng serve" I'm getting the following error:


52 <<<<<<< HEAD
app/app.module.ts:54:1 - error TS1185: Merge conflict marker encountered.

54 =======
app/app.module.ts:56:1 - error TS1185: Merge conflict marker encountered.

56 >>>>>>> master
app/example/example.module.ts:9:1 - error TS1185: Merge conflict marker encountered.

9 <<<<<<< HEAD

I have no idea what's going on here. Is there any way to solve this issue easily?

over 4 years ago · Santiago Trujillo
8 Respostas
Responde à pergunta

0

while you're merging master into your local feature branch there are some conflicts, you need to resolve them by accepting the current or incoming changes. Open those files and remove these <<<<<<< HEAD >>>>>>> master and commit your changes. If you've Visual Studio Code will clearly show you the conflicts.

Files that had conflict marker:

app/example/example.module.ts:9:1 // in this file line number 9 should've conflict marker **>>>>>**
app/app.module.ts:54:1 // in this file line number 54 should've conflict marker **>>>>>**
app/app.module.ts:56:1 // in this file line number 56 should've conflict marker **>>>>>**

Once you resolved the conflicts and still getting the error, the files might have been cached, try to switching to another branch, then switching back to the original.

Still Webpack isn't noticing your file changes - https://dev.to/pnevares/webpack-isn-t-noticing-your-file-changes-did-you-do-something-wrong-34dc

over 4 years ago · Santiago Trujillo Relatório

0

For anyone coming from Google, I had a similar issue in React, but I was 100% confident that I had already resolved all conflicts.

I fixed it by switching to another branch, then switching back to the original.


If this still does not fix the issue, remove the Node Modules cache with rm -Rf node_modules/.cache

over 4 years ago · Santiago Trujillo Relatório

0

Make sure you pulled lastest code from the master branch before merging Master into Test.

over 4 years ago · Santiago Trujillo Relatório

0

For those coming from Google that:

  • had the error with React
  • are 100% confident they have already resolved all conflict
  • user-124812948 's answer did not work

I fixed it by deleting node_modules cache: rm -Rf node_modules/.cache

Here is the link to an article that explains what's happening

over 4 years ago · Santiago Trujillo Relatório

0

Also, you can try to stop and run the npm as a short solution. Worked for me.

over 4 years ago · Santiago Trujillo Relatório

0

Encountered this issue in React, and I am sure that the merge conflicts are resolved.

I fixed it by editing the file content, by simply add/remove some code, wait it compile and reload again.

over 4 years ago · Santiago Trujillo Relatório

0

Had the same issue, but with a Vue.js project. Suggested solutions did not work for me. I had to remove and re-install all the dependencies. Only after rm -rf node_modules && yarn install the error goes away!

over 4 years ago · Santiago Trujillo Relatório

0

If the conflict markers are in an auto-generated file, regenerate it.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda