Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synthesis fails with "Could not find referrer npm package" when using a Helm chart with Deno #2435

Open
aaronkyriesenbach opened this issue Mar 14, 2025 · 0 comments
Labels
bug Something isn't working needs-triage Priority and effort undetermined yet

Comments

@aaronkyriesenbach
Copy link

aaronkyriesenbach commented Mar 14, 2025

Description of the bug:

Not sure if this is a cdk8s bug or a Deno bug but I'm starting here - please let me know if there's a better place to report this. I am running into errors synthesizing applications that use Helm charts (via both the Helm construct and chart-specific constructs generated with helm:... imports) along the lines of error: Could not find referrer npm package 'file:///home/aaron/.cache/deno/npm/registry.npmjs.org/cdk8s/2.69.52/lib/_loadurl.mjs' ([email protected]). This is only happening when building with Deno - the minimal reproducible example below synthesizes fine when using Node.

Reproduction Steps:

main.ts (this is the exact code used in the "Helm Support" example in the docs:

export class MyChart extends Chart {
  constructor(scope: Construct, id: string, props: ChartProps = {}) {
    super(scope, id, props);

    // define resources here
    new Helm(this, "redis", {
      chart: "bitnami/redis",
      values: {
        sentinel: {
          enabled: true,
        },
      },
    });
  }
}

Error Log:

$ deno run --allow-all main.ts

error: Could not find referrer npm package 'file:///home/aaron/.cache/deno/npm/registry.npmjs.org/cdk8s/2.69.52/lib/_loadurl.mjs' ([email protected]).
error: Uncaught (in promise) Error: Command failed: /usr/bin/deno /home/aaron/.cache/deno/npm/registry.npmjs.org/cdk8s/2.69.52/lib/_loadurl.mjs /tmp/cdk8s-helm-T33ZHe/chart.yaml
error: Could not find referrer npm package 'file:///home/aaron/.cache/deno/npm/registry.npmjs.org/cdk8s/2.69.52/lib/_loadurl.mjs' ([email protected]).

    at __node_internal_genericNodeError (ext:deno_node/internal/errors.ts:1969:15)
    at checkExecSyncError (node:child_process:419:11)
    at execFileSync (node:child_process:486:15)
    at loadurl (file:///home/aaron/.cache/deno/npm/registry.npmjs.org/cdk8s/2.69.52/lib/yaml.js:108:45)
    at Yaml.load (file:///home/aaron/.cache/deno/npm/registry.npmjs.org/cdk8s/2.69.52/lib/yaml.js:69:22)
    at new Include (file:///home/aaron/.cache/deno/npm/registry.npmjs.org/cdk8s/2.69.52/lib/include.js:19:37)
    at new Helm (file:///home/aaron/.cache/deno/npm/registry.npmjs.org/cdk8s/2.69.52/lib/helm.js:51:9)
    at new MyChart (file:///home/aaron/downloads/test/main.ts:9:5)
    at file:///home/aaron/downloads/test/main.ts:21:1

Environment:

  • Framework Version: Latest as of writing, 2.69.52
  • OS: Reproduced with the example above on macOS (M3) and Arch Linux

Other:

I've tried downgrading the version of CDK8s used, removing the Deno cache and re-running, etc. I honestly have no idea how to interpret this error so I'm not sure what's worth trying. I'm also happy to contribute to a fix for this if helpful, just would need pointers on where to get going.

Thank you for any ideas!

This is 🐛 Bug Report

@aaronkyriesenbach aaronkyriesenbach added bug Something isn't working needs-triage Priority and effort undetermined yet labels Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage Priority and effort undetermined yet
Projects
None yet
Development

No branches or pull requests

1 participant