728x90
반응형
○ ng build 또는 ng serve시 에러
ERROR in ./src/polyfills.ts
Module build failed: Error: Angular Compiler was detected but it was an instance of the wrong class.
This likely means you have several @ngtools/webpack packages installed. You can check this with `npm ls @ngtools/webpack`, and then remove the extra copies.
○ npm ls @ngtools/webpack 입력
+-- @angular/cli@1.6.3
| `-- @ngtools/webpack@1.9.3
`-- @ngtools/webpack@1.10.2
○ 해결방법
1.
rm -rf node_modules
2.
rm -rf package-lock.json
3.
npm cache clean -f
4.
npm install
5.
ng build
npm start
정상 동작!!
728x90
반응형
'Programming > JavaScript & TypeScript' 카테고리의 다른 글
[Node Express - Angular5] JWT 기반 사용자 인증 개발 - Angular 편 (0) | 2019.05.03 |
---|---|
ng generate error : Error: Path "/__path__/__name@dasherize@if-flat__/__name@dasherize__.service.spec.ts" does not exist. (0) | 2019.05.03 |
ng generate error : Error: Cannot read property 'dasherize' of undefined (0) | 2019.05.03 |
(NPM) 특정 버전의 모듈 설치하기 (0) | 2019.01.17 |
(Angular5) 시작하기 (0) | 2018.12.03 |