facing this error while trying ng-serve in a freshly cloned repo works fine in my previous device (new device , coworker suspect M1 apple silicon is what caused this error)
full error log https://pastebin.com/va40cDXs
Error: node_modules/ng-select2/lib/ng-select2.component.d.ts:35:21 - error TS2694: Namespace '"/Users/name/Documents/Angular/project/project_fe/project-fe/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.
35 static ɵfac: i0.ɵɵFactoryDeclaration<NgSelect2Component, never>;
~~~~~~~~~~~~~~~~~~~~
Error: node_modules/ng-select2/lib/ng-select2.component.d.ts:36:21 - error TS2694: Namespace '"/Users/name/Documents/Angular/project/project_fe/project-fe/node_modules/@angular/core/core"' has no exported member 'ɵɵComponentDeclaration'.
36 static ɵcmp: i0.ɵɵComponentDeclaration<NgSelect2Component, "ng-select2", never, { "data": "data"; "placeholder": "placeholder"; "dropdownParent": "dropdownParent"; "allowClear": "allowClear"; "value": "value"; "width": "width"; "disabled": "disabled"; "options": "options"; }, { "valueChanged": "valueChanged"; }, never, ["option, optgroup"]>;
~~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/ng-select2/lib/ng-select2.module.d.ts:5:21 - error TS2694: Namespace '"/Users/name/Documents/Angular/project/project_fe/project-fe/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.
5 static ɵfac: i0.ɵɵFactoryDeclaration<NgSelect2Module, never>;
~~~~~~~~~~~~~~~~~~~~
m
Error: node_modules/ng-select2/lib/ng-select2.module.d.ts:6:21 - error TS2694: Namespace '"/Users/name/Documents/Angular/project/project_fe/project-fe/node_modules/@angular/core/core"' has no exported member 'ɵɵNgModuleDeclaration'.
6 static ɵmod: i0.ɵɵNgModuleDeclaration<NgSelect2Module, [typeof i1.NgSelect2Component], [typeof i2.CommonModule], [typeof i1.NgSelect2Component]>;
~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/ng-select2/lib/ng-select2.module.d.ts:7:21 - error TS2694: Namespace '"/Users/name/Documents/Angular/project/project_fe/project-fe/node_modules/@angular/core/core"' has no exported member 'ɵɵInjectorDeclaration'.
7 static ɵinj: i0.ɵɵInjectorDeclaration<NgSelect2Module>;
~~~~~~~~~~~~~~~~~~~~
Error: ./node_modules/ng-select2/fesm2015/ng-select2.mjs 286:12-17
Can't import the named export 'Input' from non EcmaScript module (only default export is available)
upon npm install here's the log
npm WARN @zxing/[email protected] requires a peer of @zxing/browser@^0.0.10 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/common@^13.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/core@^13.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @types/select2@^4.0.x but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of [email protected] but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/core@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of rxjs@^5.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of zone.js@^0.8.4 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of jasmine-core@>=3.8 but none is installed. You must install peer dependencies yourself.
CodePudding user response:
try npm i
first then try ng serve
CodePudding user response:
changing ng-select2 in package.json solve my problem
from
"ng-select2": "^1.2.2",
to
"ng-select2": "1.2.5",