nxext / nx-extensions

Nx Extension for StencilJs, SvelteJS, SolidJS, Ionic and VueJs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stencil: Adding output target type Angular leads to an exception

lehmamic opened this issue · comments

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.

I have the same issue

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