Closed PatrickInFrontEnd closed 2 weeks ago
I have the same issue with every outputType (angular, react, svelte)
I tried a minimal repro by creating a new Stencil "my-lib" project and then did:
nx g @nxext/stencil:add-outputtarget my-lib --outputType='angular'
Node : 22.0.0
OS : linux-x64
pnpm : 9.1.4
nx : 18.2.1
@nx/js : 18.2.1
@nx/jest : 18.2.1
@nx/linter : 18.2.1
@nx/eslint : 18.2.1
@nx/workspace : 18.2.1
@nx/angular : 18.2.1
@nx/cypress : 18.2.1
@nx/devkit : 18.2.1
@nx/eslint-plugin : 18.2.1
@nx/storybook : 18.2.1
@nrwl/tao : 18.2.1
@nx/web : 18.2.1
@nx/webpack : 18.2.1
typescript : 5.4.5
---------------------------------------
Community plugins:
@nxext/stencil : 19.0.0
I also tried downgrading to @nxext/stencil 18.0.0 but had the same error with that
Ok, did some digging around and the problem originated from this function: https://github.com/nxext/nx-extensions/blob/d3111c75924fa9f424e655000a52468795e3b0ee/packages/stencil/src/utils/utillities.ts#L18
I've temporarily hidden my .gitignore file (mv .gitignore ..gitignore
) and then the command does execute.
After this you have to add your ./web-components-react/**/generated
path manually to the .gitignore file.
I'm sorry that I don't have time to find out what the exact cause of the problem is and to suggest a fix :(
Still appreciate for some kind of workaround - I'll try your approach, waiting for the fix then ;)
Seems like a problem with the gitignore library. I'll remove that (wasn't the first time)
Describe the bug When using command
nx g @nxext/stencil:add-outputtarget my-lib
there is an error being shown and so the output target is not being created - without the possibility to work with stencil components.To Reproduce Steps to reproduce the behavior:
nx g @nxext/stencil:add-outputtarget [lib_name] --outputType='react'
Expected behavior A config has been properly created with an output target for react-library, so that NX knows how to exactly run the library and convert Stencil web-components into wrappers for react library.
Additional context package.json file:
node version: 20.14.0 npm version: 10.7.0 OS - Macbook Pro 2019 - Sonoma 14.5 Processor: 2,6 GHz 6-Core Intel Core i7
ADDITIONAL INFO: do not mind the name of ember - it is a react application being set up