You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd be keen to work on this as we are looking to distribute a few pre-baked charts.
At the moment, when I install our package locally into a test project I get failures due to a parent chart not being found.
For some reason, Chart.of(...) fails for
import { BasicApplication } from "shared/charts" // this is locally npm-installed
class X extends Chart {
constructor(scope: Construct, id: string) {
super(scope, id)
new BasicApplication(this, `${id}-basic`, {
// ... props elided....
})
}
}
Having spent some time in the debugger, the if (c instanceof Chart) in Chart.of(thing) fails for X, even though it extends Chart.
If I inline my entire code into e.g. vendered and change the import, all is happy...
Should I open a seprate bug for 🔼 or is that something better docs might address?
Fixes#401
I haven't explicitly tested this with the scenario described in #401 but I believe the root cause is the same issue described [here](aws/constructs#955). In a nutshell, "instanceof" is unreliable since it can cause issues if libraries are referencing different versions of cdk8s library in `node_modules`.
Signed-off-by: Christopher Rybicki <rybickic@amazon.com>
I'd be keen to work on this as we are looking to distribute a few pre-baked charts.
At the moment, when I install our package locally into a test project I get failures due to a parent chart not being found.
For some reason,
Chart.of(...)
fails forHaving spent some time in the debugger, the
if (c instanceof Chart)
inChart.of(thing)
fails for X, even though it extends Chart.If I inline my entire code into e.g.
vendered
and change the import, all is happy...Should I open a seprate bug for 🔼 or is that something better docs might address?
Originally posted by @felipesere in cdk8s-team/cdk8s#794 (comment)
The text was updated successfully, but these errors were encountered: