Problem/Motivation
Can't compile on latest node/npm/ts
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
Can't compile on latest node/npm/ts
<code>
user007@user007-MacBook-Air ckeditor5_bootstrap_accordion % npm run build
> ckeditor5-bootstrap-accordion@1.0.1 build
> webpack
assets by status 28.6 KiB [cached] 1 asset
orphan modules 237 KiB [orphan] 413 modules
runtime modules 670 bytes 3 modules
built modules 61.6 KiB [built]
cacheable modules 61.4 KiB
modules by path ./ckeditor5_plugins/bootstrapAccordion/src/ 43.4 KiB 18 modules
modules by path ./icons/*.svg 1.56 KiB 3 modules
./node_modules/@ckeditor/ckeditor5-html-support/src/utils.js + 12 modules 16.4 KiB [built] [code generated]
modules by path delegated ./*.dll 210 bytes
delegated ./core.js from dll-reference CKEditor5.dll 42 bytes [built] [code generated]
delegated ./utils.js from dll-reference CKEditor5.dll 42 bytes [built] [code generated]
delegated ./widget.js from dll-reference CKEditor5.dll 42 bytes [built] [code generated]
delegated ./ui.js from dll-reference CKEditor5.dll 42 bytes [built] [code generated]
delegated ./engine.js from dll-reference CKEditor5.dll 42 bytes [built] [code generated]
external "CKEditor5.dll" 42 bytes [built] [code generated]
ERROR in /Users/user007/work/ckeditor5_bootstrap_accordion/ckeditor5_plugins/bootstrapAccordion/src/commands/bootstrapaccordionfirstitemopencommand.ts
./ckeditor5_plugins/bootstrapAccordion/src/commands/bootstrapaccordionfirstitemopencommand.ts 19:18-23
[tsl] ERROR in /Users/user007/work/ckeditor5_bootstrap_accordion/ckeditor5_plugins/bootstrapAccordion/src/commands/bootstrapaccordionfirstitemopencommand.ts(19,19)
TS2564: Property 'value' has no initializer and is not definitely assigned in the constructor.
@ ./ckeditor5_plugins/bootstrapAccordion/src/bootstrapaccordionediting.ts 12:65-125
@ ./ckeditor5_plugins/bootstrapAccordion/src/bootstrapaccordion.ts 7:52-90
@ ./ckeditor5_plugins/bootstrapAccordion/src/index.ts 6:45-76
ERROR in /Users/user007/work/ckeditor5_bootstrap_accordion/ckeditor5_plugins/bootstrapAccordion/src/commands/bootstrapaccordionfirstitemopencommand.ts
./ckeditor5_plugins/bootstrapAccordion/src/commands/bootstrapaccordionfirstitemopencommand.ts 20:2-7
[tsl] ERROR in /Users/user007/work/ckeditor5_bootstrap_accordion/ckeditor5_plugins/bootstrapAccordion/src/commands/bootstrapaccordionfirstitemopencommand.ts(20,3)
TS2300: Duplicate identifier 'value'.
@ ./ckeditor5_plugins/bootstrapAccordion/src/bootstrapaccordionediting.ts 12:65-125
@ ./ckeditor5_plugins/bootstrapAccordion/src/bootstrapaccordion.ts 7:52-90
@ ./ckeditor5_plugins/bootstrapAccordion/src/index.ts 6:45-76
ERROR in /Users/user007/work/ckeditor5_bootstrap_accordion/ckeditor5_plugins/bootstrapAccordion/src/commands/bootstrapaccordionfirstitemopencommand.ts
./ckeditor5_plugins/bootstrapAccordion/src/commands/bootstrapaccordionfirstitemopencommand.ts 20:2-7
[tsl] ERROR in /Users/user007/work/ckeditor5_bootstrap_accordion/ckeditor5_plugins/bootstrapAccordion/src/commands/bootstrapaccordionfirstitemopencommand.ts(20,3)
TS2564: Property 'value' has no initializer and is not definitely assigned in the constructor.
@ ./ckeditor5_plugins/bootstrapAccordion/src/bootstrapaccordionediting.ts 12:65-125
@ ./ckeditor5_plugins/bootstrapAccordion/src/bootstrapaccordion.ts 7:52-90
@ ./ckeditor5_plugins/bootstrapAccordion/src/index.ts 6:45-76
ERROR in /Users/user007/work/ckeditor5_bootstrap_accordion/ckeditor5_plugins/bootstrapAccordion/src/commands/bootstrapaccordionfirstitemopencommand.ts
./ckeditor5_plugins/bootstrapAccordion/src/commands/bootstrapaccordionfirstitemopencommand.ts 20:2-7
[tsl] ERROR in /Users/user007/work/ckeditor5_bootstrap_accordion/ckeditor5_plugins/bootstrapAccordion/src/commands/bootstrapaccordionfirstitemopencommand.ts(20,3)
TS2717: Subsequent property declarations must have the same type. Property 'value' must be of type 'boolean', but here has type 'false'.
@ ./ckeditor5_plugins/bootstrapAccordion/src/bootstrapaccordionediting.ts 12:65-125
@ ./ckeditor5_plugins/bootstrapAccordion/src/bootstrapaccordion.ts 7:52-90
@ ./ckeditor5_plugins/bootstrapAccordion/src/index.ts 6:45-76
ERROR in /Users/user007/work/ckeditor5_bootstrap_accordion/ckeditor5_plugins/bootstrapAccordion/src/integration/bootstrapaccordionclipboardpipeline.ts
./ckeditor5_plugins/bootstrapAccordion/src/integration/bootstrapaccordionclipboardpipeline.ts 32:50-62
[tsl] ERROR in /Users/user007/work/ckeditor5_bootstrap_accordion/ckeditor5_plugins/bootstrapAccordion/src/integration/bootstrapaccordionclipboardpipeline.ts(32,51)
TS2345: Argument of type 'import("/Users/user007/work/ckeditor5_bootstrap_accordion/node_modules/@ckeditor/ckeditor5-clipboard/node_modules/@ckeditor/ckeditor5-engine/src/view/documentfragment").ViewDocumentFragment' is not assignable to parameter of type 'import("/Users/user007/work/ckeditor5_bootstrap_accordion/node_modules/@ckeditor/ckeditor5-engine/src/view/documentfragment").ViewDocumentFragment'.
The types of 'document.selection' are incompatible between these types.
Type 'import("/Users/user007/work/ckeditor5_bootstrap_accordion/node_modules/@ckeditor/ckeditor5-clipboard/node_modules/@ckeditor/ckeditor5-engine/src/view/documentselection").ViewDocumentSelection' is not assignable to type 'import("/Users/user007/work/ckeditor5_bootstrap_accordion/node_modules/@ckeditor/ckeditor5-engine/src/view/documentselection").ViewDocumentSelection'.
Types have separate declarations of a private property '_selection'.
@ ./ckeditor5_plugins/bootstrapAccordion/src/index.ts 7:62-122
ERROR in /Users/user007/work/ckeditor5_bootstrap_accordion/ckeditor5_plugins/bootstrapAccordion/src/integration/bootstrapaccordionclipboardpipeline.ts
./ckeditor5_plugins/bootstrapAccordion/src/integration/bootstrapaccordionclipboardpipeline.ts 38:6-18
[tsl] ERROR in /Users/user007/work/ckeditor5_bootstrap_accordion/ckeditor5_plugins/bootstrapAccordion/src/integration/bootstrapaccordionclipboardpipeline.ts(38,7)
TS2322: Type 'import("/Users/user007/work/ckeditor5_bootstrap_accordion/node_modules/@ckeditor/ckeditor5-engine/src/view/documentfragment").ViewDocumentFragment' is not assignable to type 'import("/Users/user007/work/ckeditor5_bootstrap_accordion/node_modules/@ckeditor/ckeditor5-clipboard/node_modules/@ckeditor/ckeditor5-engine/src/view/documentfragment").ViewDocumentFragment'.
The types of 'document.selection' are incompatible between these types.
Type 'import("/Users/user007/work/ckeditor5_bootstrap_accordion/node_modules/@ckeditor/ckeditor5-engine/src/view/documentselection").ViewDocumentSelection' is not assignable to type 'import("/Users/user007/work/ckeditor5_bootstrap_accordion/node_modules/@ckeditor/ckeditor5-clipboard/node_modules/@ckeditor/ckeditor5-engine/src/view/documentselection").ViewDocumentSelection'.
Types have separate declarations of a private property '_selection'.
@ ./ckeditor5_plugins/bootstrapAccordion/src/index.ts 7:62-122
6 errors have detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.
webpack 5.105.4 compiled with 6 errors in 1123 ms
Issue fork ckeditor5_bootstrap_accordion-3582033
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
jannakha commentedsome quick fixes to make ts compile on latest node/npm/ts
- migrated to TS6 - https://github.com/microsoft/TypeScript/issues/62508
- fixed ckeditor5-clipboard version (^ would install 47.6 which breaks compilation)
- fixed: TS2564: Property 'value' has no initializer and is not definitely assigned in the constructor.
Comment #5
timurtripp commentedReleased version 1.1 with clean build on CKEditor 47.6.2 and info file / Composer updated to support Drupal 11.4 (but drops some older Drupal / CKEditor versions). I decided not to block installs on Drupal 11.5 in the future, but it needs to be tested thoroughly on every 11.x update of Drupal since breaking CKEditor changes are possible.