You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to upgrade JHipster Svelte blueprint to support 8.2.1 release, however, I don't see an easy way to override the prettier plugins to include prettier-plugin-svelte to transform the svelte code.
If you override to include prettier plugins, code generation fails with below stack trace:
- applying multi-step templates
✔ Git repository initialized.
create .prettierrc
create .prettierignore
✔ prettier configuration files committed to disk
- updating package.json dependencies versions
- prettifying sonar-project.properties
- adding package-info.java files
ERROR! ERROR! function hasPragma(text) {
return /^\s*<!--\s*@(format|prettier)\W/.test(text);
} could not be cloned.
DOMException [DataCloneError]: function hasPragma(text) {
return /^\s*<!--\s*@(format|prettier)\W/.test(text);
} could not be cloned.
at new DOMException (node:internal/per_context/domexception:53:5)
at WorkerInfo.postTask (/opt/svelte/node_modules/piscina/dist/src/index.js:346:23)
at ThreadPool.runTask (/opt/svelte/node_modules/piscina/dist/src/index.js:712:20)
at Piscina.run (/opt/svelte/node_modules/piscina/dist/src/index.js:923:65)
at Object.<anonymous> (file:///opt/svelte/node_modules/generator-jhipster/dist/generators/bootstrap/support/prettier-support.js:41:53)
at Object.<anonymous> (file:///opt/svelte/node_modules/p-transform/dist/index.js:13:16)
at file:///opt/svelte/node_modules/p-transform/dist/queue.js:55:47
at file:///opt/svelte/node_modules/p-transform/dist/queue.js:69:34
at file:///opt/svelte/node_modules/p-transform/node_modules/p-queue/dist/index.js:111:37
at PQueue._PQueue_tryToStartAnother (file:///opt/svelte/node_modules/p-transform/node_modules/p-queue/dist/index.js:285:13)
Error: Process completed with exit code 1.
Motivation for or Use Case
Reproduce the error
Related issues
It seems the issue occurs due to switch to use web workers for prettier and eslint transform tasks. Serialization seems to not work correctly when overriding the plugins.
Suggest a Fix
JHipster Version(s)
8.2.1
JHipster configuration
Entity configuration(s) entityName.json files generated in the .jhipster directory
Browsers and Operating System
Checking this box is mandatory (this is just to show you read everything)
The text was updated successfully, but these errors were encountered:
Overview of the issue
I am trying to upgrade JHipster Svelte blueprint to support 8.2.1 release, however, I don't see an easy way to override the prettier plugins to include
prettier-plugin-svelte
to transform the svelte code.If you override to include prettier plugins, code generation fails with below stack trace:
Motivation for or Use Case
Reproduce the error
Related issues
It seems the issue occurs due to switch to use web workers for prettier and eslint transform tasks. Serialization seems to not work correctly when overriding the plugins.
Suggest a Fix
JHipster Version(s)
8.2.1
JHipster configuration
Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryBrowsers and Operating System
The text was updated successfully, but these errors were encountered: