nx-extensions
nx-extensions copied to clipboard
Stencil: Error with Stencil 2.17.2 and higher
Describe the bug Build fails with an error since 2.17.2 and higher
To Reproduce Use Stencil higher than 2.17.1
Expected behavior Should work
Additional context Error:
npx nx build app
> nx run app:build
[ WARN ] exit 1
/private/tmp/devkit-test-latest/node_modules/@stencil/core/compiler/stencil.js:41835
results.fileNames = results.fileNames.filter((f) => {
^
TypeError: Cannot read properties of undefined (reading 'fileNames')
at Object.t.getParsedCommandLineOfConfigFile (/private/tmp/devkit-test-latest/node_modules/@stencil/core/compiler/stencil.js:41835:33)
at pe (/private/tmp/devkit-test-latest/node_modules/@stencil/core/compiler/stencil.js:8913:2294592)
at Object.e.createWatchProgram (/private/tmp/devkit-test-latest/node_modules/@stencil/core/compiler/stencil.js:8913:2287601)
at createTsBuildProgram (/private/tmp/devkit-test-latest/node_modules/@stencil/core/compiler/stencil.js:63447:12)
at /private/tmp/devkit-test-latest/node_modules/@stencil/core/compiler/stencil.js:63481:5
at new Promise (<anonymous>)
at createFullBuild (/private/tmp/devkit-test-latest/node_modules/@stencil/core/compiler/stencil.js:63457:10)
at Object.build (/private/tmp/devkit-test-latest/node_modules/@stencil/core/compiler/stencil.js:64730:23)
at taskBuild (/private/tmp/devkit-test-latest/node_modules/@stencil/core/cli/index.cjs:1671:40)
at async runTask (/private/tmp/devkit-test-latest/node_modules/@stencil/core/cli/index.cjs:2327:13)
—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
> NX Ran target build for project app (748ms)
✖ 1/1 failed
✔ 0/1 succeeded [0 read from cache]
just so if anyone is struggling, a temporary fix is to pin @stencil/core to 2.17.1 and @nxext/stencil to 14.0.5 with nrwl packages to 14.5.x
Steps to reproduce:
yarn create nx-workspace
- Name: test-stencil
- Type: app
- nx-cloud: no
yarn add --dev @nxext/stencil
yarn nx generate @nxext/stencil:application sample --no-interactive
yarn nx run sample:build
-> Working build
yarn add --dev @stencil/[email protected]
yarn nx run sample:build
-> Failing Build
Repo: https://github.com/m4s7/failing-sample
👋 I believe this is an issue on Stencil's end. https://github.com/ionic-team/stencil/pull/3518 should fix this issue
@rwaskiewicz thanks. I follow the issue with that in the stencil project as well 😁 after that’s released I’ll remove the temporary version pin and add the latest version by default
I think we can close this -- works fine after stencil 2.17.4 release