javascript - ngx-chess-board.component.d.ts:75:21 - error TS2694: Namespace '"/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration' - TagMerge
3ngx-chess-board.component.d.ts:75:21 - error TS2694: Namespace '"/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'ngx-chess-board.component.d.ts:75:21 - error TS2694: Namespace '"/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'

ngx-chess-board.component.d.ts:75:21 - error TS2694: Namespace '"/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'

Asked 9 months ago
0
3 answers

This was resolved by changing

"ngx-chess-board": "^2.0.7",

to:

"ngx-chess-board": "2.0.7",

Source: link

0

Building project with tsx results in following error that appears to be coming from styled components module (or react native itself? not too sure here)
node_modules/styled-components/native/index.d.ts(38,52): error TS2694: Namespace '"/Users/me/Documents/Repositories/project/node_modules/@types/react-native/index"' has no exported member 'NavigatorProperties'.
@morajabi
"@types/react": "16.0.20",
"@types/react-native": "0.50.0"
"react": "16.0.0",
"react-native": "0.50.1",

Source: link

0

I get similar set of errors when trying to compile Angular project using ol v6.6.0, but I have one new - TS2315
Error: node_modules/ol/ImageBase.d.ts:32:48 - error TS2694: Namespace '"/home/yohny/web/hh-fe/Frontend/ClientApp/node_modules/ol/ImageState"' has no exported member 'default'.

32     protected state: import("./ImageState.js").default;
                                                  ~~~~~~~


Error: node_modules/ol/Tile.d.ts:131:47 - error TS2694: Namespace '"/home/yohny/web/hh-fe/Frontend/ClientApp/node_modules/ol/TileState"' has no exported member 'default'.

131     protected state: import("./TileState.js").default;
                                                  ~~~~~~~


Error: node_modules/ol/geom/SimpleGeometry.d.ts:27:53 - error TS2694: Namespace '"/home/yohny/web/hh-fe/Frontend/ClientApp/node_modules/ol/geom/GeometryLayout"' has no exported member 'default'.

27     protected layout: import("./GeometryLayout.js").default;
                                                       ~~~~~~~


Error: node_modules/ol/proj/Units.d.ts:7:31 - error TS2315: Type 'Object' is not generic.

7 export const METERS_PER_UNIT: Object<Units, number>;
                                ~~~~~~~~~~~~~~~~~~~~~


Error: node_modules/ol/source/Cluster.d.ts:110:31 - error TS2314: Generic type 'Feature<Geometry>' requires 1 type argument(s).

110     protected features: Array<Feature>;
                                  ~~~~~~~


Error: node_modules/ol/source/Cluster.d.ts:121:23 - error TS2314: Generic type 'VectorSource<Geometry>' requires 1 type argument(s).

121     protected source: VectorSource;
                          ~~~~~~~~~~~~
Error: src/app/modules/olmap/classes/click_interactions.ts:515:46 - error TS2339: Property 'getFeatures' does not exist on type 'Object'.
515             const selectedFeature = e.target.getFeatures().item(0);
                                                 ~~~~~~~~~~~


Error: src/app/modules/olmap/classes/click_interactions.ts:663:36 - error TS2314: Generic type 'Feature<Geometry>' requires 1 type argument(s).

663             const selectedFeature: OlFeature = e.target.getFeatures().item(0);
                                       ~~~~~~~~~


Error: src/app/modules/olmap/classes/click_interactions.ts:663:57 - error TS2339: Property 'getFeatures' does not exist on type 'Object'.

663             const selectedFeature: OlFeature = e.target.getFeatures().item(0);
                                                            ~~~~~~~~~~~


Error: src/app/modules/olmap/classes/click_interactions.ts:83:34 - error TS2314: Generic type 'Feature<Geometry>' requires 1 type argument(s).

83     private lastClickedBoundary: OlFeature;
                                    ~~~~~~~~~


Error: src/app/modules/olmap/classes/click_interactions.ts:841:50 - error TS2314: Generic type 'Feature<Geometry>' requires 1 type argument(s).

841     private onPopBoundarySelect(selectedFeature: OlFeature) {
                                                     ~~~~~~~~~
@ankur09011 These are different issues, because the errors are in your code, not the OpenLayers library. See #12542 for the generic type. For e.target, you either need to cast that to the actual type, or reference the instance instead of e.target, e.g.
import Select from 'ol/interaction/Select';
const select = new Select({
  // ...
});
select.on('select', e => {
  const selectedFeatureWithCast: OlFeature<Geometry> = (e.target as Select).getFeatures().item(0);
  const selectedFeatureDirect: OlFeature<Geometry> = select.getFeatures().item(0);
});

Source: link

Recent Questions on javascript

    Programming Languages