Closed sanak closed 2 years ago
I tried to upgrade latest openlayers, ol-ext and types-ol-ext versions with the following changes,
--- a/package.json
+++ b/package.json
@@ -22,12 +22,11 @@
"dependencies": {
"@juggle/resize-observer": "^3.3.1",
"font-awesome": "^4.7.0",
- "ol": "^6.5.0",
- "ol-ext": "^3.2.3"
+ "ol": "^6.13.0",
+ "ol-ext": "^3.2.22"
},
"devDependencies": {
- "@types/ol": "^6.5.3",
- "@types/ol-ext": "npm:@gtt-project/types-ol-ext",
+ "@types/ol-ext": "npm:@siedlerchr/types-ol-ext",
"css-loader": "^5.1.1",
"sass": "^1.32.8",
"sass-loader": "^11.0.1",
but I encountered the following error, when executing npx webpack
.
% npx webpack
assets by status 1.94 MiB [cached] 15 assets
orphan modules 4.34 MiB [orphan] 452 modules
runtime modules 1.71 KiB 5 modules
cacheable modules 2.18 MiB (javascript) 1.25 MiB (asset)
asset modules 588 bytes (javascript) 1.25 MiB (asset)
modules by path ./src/ 336 bytes (javascript) 185 KiB (asset) 8 modules
modules by path ./node_modules/font-awesome/fonts/ 252 bytes (javascript) 1.06 MiB (asset)
modules by path ./node_modules/font-awesome/fonts/*.eot 84 bytes (javascript) 324 KiB (asset) 2 modules
javascript modules 2.17 MiB
modules by path ./node_modules/ 178 KiB
modules by path ./node_modules/css-loader/dist/runtime/*.js 2.38 KiB
./node_modules/css-loader/dist/runtime/api.js 1.57 KiB [built] [code generated]
./node_modules/css-loader/dist/runtime/getUrl.js 830 bytes [built] [code generated]
5 modules
modules by path ./src/ 2 MiB 5 modules
ERROR in /Users/sanak/Projects/gtt-project/git/redmine-gtt/plugins/redmine_gtt/src/components/gtt-client.ts
./src/components/gtt-client.ts 63:10-21
[tsl] ERROR in /Users/sanak/Projects/gtt-project/git/redmine-gtt/plugins/redmine_gtt/src/components/gtt-client.ts(63,11)
TS2314: Generic type 'VectorLayer<VectorSourceType>' requires 1 type argument(s).
@ ./src/index.ts 14:0-52 17:8-17
ERROR in /Users/sanak/Projects/gtt-project/git/redmine-gtt/plugins/redmine_gtt/src/components/gtt-client.ts
./src/components/gtt-client.ts 64:10-21
[tsl] ERROR in /Users/sanak/Projects/gtt-project/git/redmine-gtt/plugins/redmine_gtt/src/components/gtt-client.ts(64,11)
TS2314: Generic type 'VectorLayer<VectorSourceType>' requires 1 type argument(s).
@ ./src/index.ts 14:0-52 17:8-17
ERROR in /Users/sanak/Projects/gtt-project/git/redmine-gtt/plugins/redmine_gtt/src/components/gtt-client.ts
./src/components/gtt-client.ts 157:39-43
[tsl] ERROR in /Users/sanak/Projects/gtt-project/git/redmine-gtt/plugins/redmine_gtt/src/components/gtt-client.ts(157,40)
TS2314: Generic type 'TileLayer<TileSourceType>' requires 1 type argument(s).
@ ./src/index.ts 14:0-52 17:8-17
ERROR in /Users/sanak/Projects/gtt-project/git/redmine-gtt/plugins/redmine_gtt/src/components/gtt-client.ts
./src/components/gtt-client.ts 331:24-40
[tsl] ERROR in /Users/sanak/Projects/gtt-project/git/redmine-gtt/plugins/redmine_gtt/src/components/gtt-client.ts(331,25)
TS2345: Argument of type 'LayerPopup' is not assignable to parameter of type 'Control'.
Types of property 'on' are incompatible.
Type '{ (type: string | string[], listener: (p0: any) => any): EventsKey | EventsKey[]; (type: "change", listener: (evt: BaseEvent) => void): EventsKey; (type: "error", listener: (evt: BaseEvent) => void): EventsKey; (type: "propertychange", listener: (evt: ObjectEvent) => void): EventsKey; (type: "drawlist", listener: (e...' is not assignable to type 'ObjectOnSignature<EventsKey>'.
Type '{ (type: string | string[], listener: (p0: any) => any): EventsKey | EventsKey[]; (type: "change", listener: (evt: BaseEvent) => void): EventsKey; (type: "error", listener: (evt: BaseEvent) => void): EventsKey; (type: "propertychange", listener: (evt: ObjectEvent) => void): EventsKey; (type: "drawlist", listener: (e...' is not assignable to type 'CombinedOnSignature<EventTypes | "propertychange", EventsKey>'.
Type 'EventsKey | EventsKey[]' is not assignable to type 'EventsKey[]'.
Type 'EventsKey' is missing the following properties from type 'EventsKey[]': length, pop, push, concat, and 26 more.
@ ./src/index.ts 14:0-52 17:8-17
ERROR in /Users/sanak/Projects/gtt-project/git/redmine-gtt/plugins/redmine_gtt/src/components/gtt-client.ts
./src/components/gtt-client.ts 368:22-45
[tsl] ERROR in /Users/sanak/Projects/gtt-project/git/redmine-gtt/plugins/redmine_gtt/src/components/gtt-client.ts(368,23)
TS2345: Argument of type 'FeatureLike[]' is not assignable to parameter of type 'Feature<Geometry>[]'.
Type 'FeatureLike' is not assignable to type 'Feature<Geometry>'.
Type 'RenderFeature' is missing the following properties from type 'Feature<Geometry>': on, once, un, geometryName_, and 40 more.
@ ./src/index.ts 14:0-52 17:8-17
ERROR in /Users/sanak/Projects/gtt-project/git/redmine-gtt/plugins/redmine_gtt/src/components/gtt-client.ts
./src/components/gtt-client.ts 385:22-34
[tsl] ERROR in /Users/sanak/Projects/gtt-project/git/redmine-gtt/plugins/redmine_gtt/src/components/gtt-client.ts(385,23)
TS2709: Cannot use namespace 'GeometryType' as a type.
@ ./src/index.ts 14:0-52 17:8-17
ERROR in /Users/sanak/Projects/gtt-project/git/redmine-gtt/plugins/redmine_gtt/src/components/gtt-client.ts
./src/components/gtt-client.ts 445:26-33
[tsl] ERROR in /Users/sanak/Projects/gtt-project/git/redmine-gtt/plugins/redmine_gtt/src/components/gtt-client.ts(445,27)
TS2339: Property 'element' does not exist on type 'Event | BaseEvent'.
Property 'element' does not exist on type 'Event'.
@ ./src/index.ts 14:0-52 17:8-17
ERROR in /Users/sanak/Projects/gtt-project/git/redmine-gtt/plugins/redmine_gtt/src/components/gtt-client.ts
./src/components/gtt-client.ts 716:52-59
[tsl] ERROR in /Users/sanak/Projects/gtt-project/git/redmine-gtt/plugins/redmine_gtt/src/components/gtt-client.ts(716,53)
TS7006: Parameter 'feature' implicitly has an 'any' type.
@ ./src/index.ts 14:0-52 17:8-17
ERROR in /Users/sanak/Projects/gtt-project/git/redmine-gtt/plugins/redmine_gtt/src/components/gtt-client.ts
./src/components/gtt-client.ts 1003:59-66
[tsl] ERROR in /Users/sanak/Projects/gtt-project/git/redmine-gtt/plugins/redmine_gtt/src/components/gtt-client.ts(1003,60)
TS7006: Parameter 'feature' implicitly has an 'any' type.
@ ./src/index.ts 14:0-52 17:8-17
webpack 5.24.4 compiled with 9 errors in 15011 ms
To fix some of above errors, I guess that the following @types/ol
upgrade is also necessary.
https://github.com/hanreev/types-ol/commit/c038ac7fa5aa6d25498fccdff8acab755bfdf897
@smellman
I couldn't find how to solve above errors.
Could you take over this issue and related PR #142 ?
Close this, because #142 was merged already.
Improvement Upgrade openlayers, ol-ext and types-ol-ext to the latest versions