Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 15, 2025

Description

The npm build was failing because @deno/dnt@0.41.3 attempted to resolve @types/node@24.2.0, which doesn't exist in the npm registry. Additionally, puppeteer's Chrome download caused failures in network-restricted CI environments.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Other (please describe):

Changes Made

  • Upgraded @deno/dnt from 0.41.3 to 0.42.3 to fix @types/node resolution
  • Added explicit dependencies to package.json.template:
    • @types/node@^20.17.13 (devDependencies)
    • fast-glob@^3.3.2 (dependencies - Node.js runtime requirement)
    • handlebars@^4.7.8 (dependencies)
  • Added PUPPETEER_SKIP_DOWNLOAD env var to CI workflow to prevent Chrome download
  • Added cache reload step in CI: deno cache --reload mod.ts cli.ts

Testing

  • Tested with Deno runtime
  • Tested with Node.js runtime (if applicable)
  • Ran deno task gen successfully
  • Ran deno lint (noted any acceptable errors)
  • Ran deno check mod.ts

Architectural Decision Record (ADR)

  • This change requires an ADR
    • ADR has been created and included in docs/adr/
    • ADR index has been updated in docs/adr/README.md
  • This change does not require an ADR

If ADR is required but not included, please explain why:

Dependency version updates and build configuration fixes are maintenance changes, not architectural decisions.

Documentation

  • Documentation has been updated (if needed)
  • README updated (if needed)
  • CONTRIBUTING.md updated (if needed)
  • No documentation changes needed

Breaking Changes

None. This is a build-time fix with no runtime impact.

Related Issues

Fixes #[issue_number]

Additional Notes

The previous comment in build_npm.ts about WASM panic issues with dnt@0.42.3 appears to have been resolved upstream, as the build now completes successfully without encountering those errors.

Checklist

  • My code follows the project's coding standards
  • I have performed a self-review of my own code
  • I have commented my code where necessary
  • My changes generate no new warnings
  • I have updated the documentation accordingly
  • My changes maintain compatibility with both Deno and Node.js (where applicable)

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • googlechromelabs.github.io
    • Triggering command: node install.mjs (dns block)
  • https://storage.googleapis.com/chrome-for-testing-public/131.0.6778.204/linux64/chrome-linux64.zip
    • Triggering command: node install.mjs (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Ensure package is published</issue_title>
<issue_description>The job failed due to the following error:

error: Failed resolving binary export. '/home/runner/.cache/deno/npm/registry.npmjs.org/@types/node/24.2.0/package.json' did not exist

This likely occurred during the "Build npm package" step in the test-npm-build job, which runs deno task build:npm. Here’s how to resolve the problem:

  1. Ensure @types/node is installed as a dependency in your npm package. You might need to add it to your package.json dependencies or devDependencies.
  2. If you're using deno task build:npm, make sure all npm dependencies are properly specified in your deno.json/deno.jsonc and package.json files.
  3. Clean the Deno npm cache before the build step to prevent stale or missing packages:

Add this step before "Build npm package" in your GitHub Actions workflow:

- name: Clean Deno npm cache
  run: deno cache --reload
  1. Consider updating Deno and Node.js to their latest stable versions in your workflow configuration.

You can review or edit the workflow here: .github/workflows/ci.yml (ref: 38cc820).

If the error persists, manually install the missing @types/node version:

npm install @types/node@24.2.0 --save-dev

Add this installation step to your workflow if needed. This should resolve the package.json not found error and allow the job to complete successfully.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits November 15, 2025 00:07
Co-authored-by: kayodebristol <3579196+kayodebristol@users.noreply.github.com>
Co-authored-by: kayodebristol <3579196+kayodebristol@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix package publication issue for npm build Fix npm build failure due to non-existent @types/node@24.2.0 Nov 15, 2025
Copilot AI requested a review from kayodebristol November 15, 2025 00:18
@kayodebristol kayodebristol marked this pull request as ready for review November 15, 2025 00:22
@kayodebristol kayodebristol merged commit e21d63f into main Nov 15, 2025
3 checks passed
@kayodebristol kayodebristol deleted the copilot/ensure-package-is-published branch November 15, 2025 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ensure package is published

2 participants