반응형

에러 내용

Error: node_modules/@angular/material/core/index.d.ts:794:21 - error TS2694: Namespace '"/Users/junhyeok/project/new/new-project/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.

794     static ɵfac: i0.ɵɵFactoryDeclaration<MatRipple, [null, null, null, { optional: true; }, { optional: true; }]>;

 

Error: ./src/main.ts
Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
Error: Unknown import type?
    at Object.reflectTypeEntityToDeclaration (/Users/junhyeok/project/new/new-project/node_modules/@angular/compiler-cli/src/ngtsc/reflection/src/typescript.js:448:23)
    at /Users/junhyeok/project/new/new-project/node_modules/@angular/compiler-cli/src/ngtsc/metadata/src/util.js:34:35
    at Array.map (<anonymous>)
    at Object.extractReferencesFromType (/Users/junhyeok/project/new/new-project/node_modules/@angular/compiler-cli/src/ngtsc/metadata/src/util.js:29:29)

 

호환문제 ?

 

문제 이유

angular version 문제라고 합니다.

angular v11 에서 angular v14로 업그레이드

 

공식 홈페이지에서 하라던 내용

$ ng update @angular/core@12 @angular/cli@12

CLI 버전이 오래되어서 업데이트 하라던 내용인것 같습니다.

 

 

해결 방법

$ npm install -g npm-check-updates

$ ncu -u

$ npm install

버전이 호환되지 않아서 그랬던 내용인것 같습니다.

버전이 올라가면서 옛날 버전과는 호환이 되지 않았던 것인듯 싶습니다. 

새로운 프로젝트를 할 때는 항상 최신 버전으로 하는 방향으로 생각해야 할 듯 합니다.

 

반응형

'Angular > Angular' 카테고리의 다른 글

[ Angular ] 서버로 전달하기 [ NoSQL ]  (0) 2022.07.07
[ Angular ] font-awesome 사용하기  (1) 2022.06.28
[ Angular ] @Output 사용법  (0) 2022.06.23
[ Angular ] @Input 사용법  (1) 2022.06.23
[ Angular ] font 사용하기  (0) 2022.06.21

+ Recent posts