nx-extensions
nx-extensions copied to clipboard
Stencil: `Cannot read properties of undefined (reading 'validateConfig')`
Describe the bug
When trying to use nx build elements
(the lib package name is ‘elements’ for this project), nx gives the error in the title. The task is configured like so:
"build": {
"command": "@nxext/stencil:build",
"options": {
"configPath": "packages/elements/stencil.config.ts",
"outputPath": "packages/elements/dist"
},
"outputs": ["{options.outputPath}"]
}
Unfortunately passing --verbose
does not provide a stacktrace. This was after some other debugging that prompted populating configPath
and outputPath
(these error instead of being listed as required by the schema.json), so I can confirm Nx is running the executor provided in @nxext/stencil
.
To Reproduce
It will be difficult to provide a minimal reproduction because @nxext does not provide any functioning example project (that I could find), and I was unable to generate a functioning project using nx g @nxext/stencil:lib
(#1087).
For me:
- Have an otherwise functioning nx workspace
- Install
@nxext/stencil
as a dev dependency - Have an otherwise functioning Stencil project in the workspace
- Add a project.json with a build target configured as above.
- Observe issue
Expected behavior Should produce a build output without errors.
Additional context A proven, functioning project using these executors would help check my sanity. Is one available?
Hi @thure , the issue seems related to @stencil/core version >= 4.17, installing version 4.16.0 works
Hi there @DominikPieper 👋🏼, sorry to ping you directly but, when you have time, could you please take a look at the associated PR to solve this issue? This is blocking us from upgrading to the latest Stencil version. Thanks a ton!