Closed chanakya-svt closed 2 days ago
Sorry but your reproduction is not minimal. I'm sure you don't need all those dependencies. Please minimize it down to under 5 files.
Happy to reopen the issue once updated.
@privatenumber
Thank you for your quick response regarding the issue. The reproduction repository is minimal, containing just one file (apps/crds/index.ts), which serves as the main program.
All other files within libs/custom-resource-definitions are automatically generated by the crd2pulumi tool. Each of these files includes a warning comment at the top, like the one below:
// *** WARNING: this file was generated by crd2pulumi. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
As a result, the files in libs/custom-resource-definitions
should be treated as external libraries, and no modifications can be made to them. This means that apps/crds/index.ts
is the only file that can be modified along with nx(project.json), pulumi(Pulumi.yaml) and typescript(tsconfig.*.json) metadata files.
Also removed all the unused packages from package.json and unused code from libs/custom-resource-definitions
(like the certificates folder)
@privatenumber This also looks like a nested import issue. If I change the import in apps/crds/index.ts
from
import { certManagerIssuers } from '../../libs/custom-resource-definitions/src/';
new certManagerIssuers.cert_manager.v1.Issuer(...)
to
import { Issuer } from '../../libs/custom-resource-definitions/src/cert-manager/issuers/cert_manager/v1/issuer';
new Issuer(...)
I get no error and everything executes correctly.
libs/custom-resource-definitions/src/cert-manager
for it to be considered a minimal reproduction.
Acknowledgements
Minimal reproduction URL
https://github.com/chanakya-svt/crd2pulumi-tsx-repro
Problem & expected behavior (under 200 words)
The reproduction repo has a readme with the error, but in short when importing and invoking a class I am receiving the following error:
Versions:
Bugs are expected to be fixed by those affected by it
Compensating engineering work will speed up resolution and support the project