nxext / nx-extensions

Nx Extensions for Stencil, Svelte, SolidJS, Preact, Ionic, and Capacitor
MIT License
458 stars 101 forks source link

Stencil: Adding output target type Angular leads to an exception #1066

Open lehmamic opened 8 months ago

lehmamic commented 8 months ago

Describe the bug

When I trie to use the add-outputtarget generator to create an angular wrapper it throws an exception.

Error: ENOENT: no such file or directory, open '/Users/leh/Data/misc/stencil-test/libs/web-components-angular/src/lib/web-components-angular.module.ts'
    at Object.openSync (node:fs:581:18)
    at readFileSync (node:fs:460:35)
    at FsTree.fsReadFile (/Users/leh/Data/misc/stencil-test/node_modules/nx/src/generators/tree.js:240:44)
    at FsTree.read (/Users/leh/Data/misc/stencil-test/node_modules/nx/src/generators/tree.js:31:32)
    at addLibraryDirectives (/Users/leh/Data/misc/stencil-test/node_modules/@nxext/stencil/src/generators/add-outputtarget/add-angular/generator.js:59:29)
    at /Users/leh/Data/misc/stencil-test/node_modules/@nxext/stencil/src/generators/add-outputtarget/add-angular/generator.js:73:9
    at Generator.next (<anonymous>)
    at fulfilled (/Users/leh/Data/misc/stencil-test/node_modules/tslib/tslib.js:166:62)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

To Reproduce

Given: An nx workspace >v17 with a stencil project. Execute: nx g @nxext/stencil:add-outputtarget web-components --outputType angular --importPath @my-lib/components/angular --publishable --verbose

Expected behavior

It generates the angular wrapper library

Additional context

It seems that the angular module file in the library is expected but the new angular library generator will generate a standalone components library by default which does not create a module file anymore.

Jhonnathan-Medina commented 6 months ago

I have the same issue

vrxj81 commented 5 months ago

there's a PR for this, hang on...