Closed tasso94 closed 3 months ago
Updating to recent form-js
versions 1.8.0-1.8.6 triggers an npm build error:
ERROR in ./node_modules/@bpmn-io/form-js-editor/dist/index.cjs 12:13-31
Module not found: Error: Package path . is not exported from package /camunda-bpm-platform/webapps/frontend/node_modules/@bpmn-io/form-js-editor/node_modules/min-dom (see exports field in /camunda-bpm-platform/webapps/frontend/node_modules/@bpmn-io/form-js-editor/node_modules/min-dom/package.json)
@ ./node_modules/@bpmn-io/form-js/dist/index.cjs 4:19-53
@ ./ui/tasklist/client/scripts/form/directives/cam-tasklist-form-camunda.js 67:11-43
Looks like min-dom
package doesn't define exports for CommonJS require nor does it have a default export. Node section about conditional exports: https://nodejs.org/api/packages.html#conditional-exports
After manually adding the line, it works:
"exports": {
".": {
"import": "./dist/index.js",
"require": "./dist/index.js", <--
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
},
@bpmn-io/form-js
1.8.7 was released with the rolled back min-dom
version fix.
7.19 & 7.20 branches have some issues, I am looking at it.
Local tests show no error. CI looks rather flaky.
When running locally I get the following error in cockpit & tasklist:
RangeError: Invalid top rule name Expression
at n.value (deps.js?bust=7.19.13-SNAPSHOT-1716388298671:2:4095473)
at n.value (deps.js?bust=7.19.13-SNAPSHOT-1716388298671:2:189404)
at require.605.@codemirror/autocomplete (deps.js?bust=7.19.13-SNAPSHOT-1716388298671:2:1465311)
at i (deps.js?bust=7.19.13-SNAPSHOT-1716388298671:2:261)
at deps.js?bust=7.19.13-SNAPSHOT-1716388298671:2:296
at require.3.@bpmn-io/feel-lint (deps.js?bust=7.19.13-SNAPSHOT-1716388298671:2:19587)
at i (deps.js?bust=7.19.13-SNAPSHOT-1716388298671:2:261)
at deps.js?bust=7.19.13-SNAPSHOT-1716388298671:2:296
at require.@bpmn-io/form-js-editor.@bpmn-io/draggle (deps.js?bust=7.19.13-SNAPSHOT-1716388298671:2:4249021)
at i (deps.js?bust=7.19.13-SNAPSHOT-1716388298671:2:261)
Solution: After adding @bpmn-io/feel-editor
to Grunt ensureLibs
cockpit and tasklist webapps work fine.
Acceptance Criteria (Required on creation)
Bump
form-js
to a version >= 1.8.0.Hints
Links
Breakdown
Dev2QA handover