KyleJuneK
Denoβ€’8mo agoβ€’
2 replies
KyleJune

Caching node dependencies in CI error

When I run my workflow without DENO_DIR set, my tests in CI pass.
https://github.com/udibo/juniper/actions/runs/14962769325/job/42027376603
When I tried adding caching like in the deno docs, I get a failure.
https://docs.deno.com/runtime/reference/continuous_integration/#caching-dependencies
Here you can see a build that failed with the following errors. It appears the node dependencies work differently if you have a DENO_DIR specified, resulting in failure.
https://github.com/udibo/juniper/actions/runs/14962853590/job/42027859303
Is there a way I can fix this or should I just go without caching my deno dependencies?
 error: Relative import path "stream" not prefixed with / or ./ or ../ and not in import map from "file:///home/runner/work/juniper/juniper/deno_cache/npm/registry.npmjs.org/pg-protocol/1.9.5/src/inbound-parser.test.ts"
  hint: If you want to use a built-in Node module, add a "node:" prefix (ex. "node:stream").
Was this page helpful?