Angular Compiler was Detected but it was an instance of the Wrong class

Asked

Viewed 55 times

0

I am currently working on a project, consuming a Rest api from the angular, but in the process, I am encountering an error that is returning me that I have 2 webpack packages within my application.

I tried to find some solution on the case, but none were successful. I’ve done everything, delete the folders (nodes_modules and packaje-lock.json - according to some situations similar to mine, but I can’t really find what is causing this) and install again with npm install, but keeps returning the same error, follows below the screenshots of the error and my package.json.

The version of angular/cli is 6.0.8 according to the list of the 1st webpack, my ts is in version 2.7.2.

as I mentioned deleted the files urge them again as prints below but when I give the ng serve again returns me the error.

inserir a descrição da imagem aqui

inserir a descrição da imagem aqui

inserir a descrição da imagem aqui

inserir a descrição da imagem aqui

inserir a descrição da imagem aqui

inserir a descrição da imagem aqui

inserir a descrição da imagem aqui

  • tries to run npm installl with sudo

  • I’ve done it before, but it’s still the same mistake, thank you!

  • Thus uninstall Node, limap node_modules both global and project, clear npm cache and install again.

  • Still unsuccessful, I give git clone in the master of the project repository, in gitgnore, which is configured not to upload the dependency files (node_modules), ie no dependency is installed, when running npm install generates this error, I can’t find these two webpack, I did everything as you said, I deleted the project, I gave the git clone, I deleted the nodejs, I cleared the npm cache, and I can’t find this damn mistake.

  • Obs: and when I give the npm install there comes a certain time it stops to extract the packages to install, only after two or three times it finishes installing the npm install successfully, in fact I do not know what is generating this error.

  • Obs 2: when I just give npm install and give an npm ls @ngtools/webpack, it lists me again the two webpack as shown in the image above.

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.