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
The API client was compiled with tsc but not bundled in a way that it could be properly consumed by an application without transpiling the dependency. In a Next.js project this would result in the failure Error [ERR_MODULE_NOT_FOUND]: Cannot find module.
Solution
I've migrated the project to use tsdown which is the modern iteration on the deprecated tsup bundler. Allows us to build and export ESM and CJS bundles with very little config.
Testing
I installed the new version in one of our internal projects using npm link and the app builds without transpilation.
The action failed during the dependency installation step npm ci with npm error code EUSAGE because package.json and package-lock.json are out of sync. - npm ci requires the lockfile to exactly match package.json, but the lockfile contains multiple mismatched versions (e.g. tsdown@0.15.12 vs required tsdown@0.22.3, cac@6.7.14 vs required cac@7.0.0, various rolldown packages). - The lockfile is also missing required entries (e.g. import-without-cache@0.4.0, @rolldown/binding-linux-ppc64-gnu@1.1.2, @types/jsesc@2.5.1, estree-walker@3.0.3, @types/estree@1.0.9). As a result, npm ci aborted and the job exited with code 1.
Relevant error logs:
1: ##[group]Runner Image Provisioner2: Hosted Compute Agent
...
139: node-version: 22.x140: check-latest: false141: token: ***142: package-manager-cache: true143: ##[endgroup]144: Found in cache @ /opt/hostedtoolcache/node/22.22.3/x64145: ##[group]Environment details146: node: v22.22.3147: npm: 10.9.8148: yarn: 1.22.22149: ##[endgroup]150: ##[group]Run npm ci151: �[36;1mnpm ci�[0m152: shell: /usr/bin/bash -e {0}153: ##[endgroup]154: npm error code EUSAGE155: npm error156: npm error `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.157: npm error158: npm error Invalid: lock file's tsdown@0.15.12 does not satisfy tsdown@0.22.3159: npm error Invalid: lock file's cac@6.7.14 does not satisfy cac@7.0.0160: npm error Invalid: lock file's hookable@5.5.3 does not satisfy hookable@6.1.1161: npm error Missing: import-without-cache@0.4.0 from lock file162: npm error Invalid: lock file's rolldown@1.0.0-beta.45 does not satisfy rolldown@1.1.2163: npm error Invalid: lock file's rolldown-plugin-dts@0.17.8 does not satisfy rolldown-plugin-dts@0.26.0164: npm error Invalid: lock file's @oxc-project/types@0.95.0 does not satisfy @oxc-project/types@0.137.0165: npm error Invalid: lock file's @rolldown/binding-android-arm64@1.0.0-beta.45 does not satisfy @rolldown/binding-android-arm64@1.1.2166: npm error Invalid: lock file's @rolldown/binding-darwin-arm64@1.0.0-beta.45 does not satisfy @rolldown/binding-darwin-arm64@1.1.2167: npm error Invalid: lock file's @rolldown/binding-darwin-x64@1.0.0-beta.45 does not satisfy @rolldown/binding-darwin-x64@1.1.2168: npm error Invalid: lock file's @rolldown/binding-freebsd-x64@1.0.0-beta.45 does not satisfy @rolldown/binding-freebsd-x64@1.1.2169: npm error Invalid: lock file's @rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.45 does not satisfy @rolldown/binding-linux-arm-gnueabihf@1.1.2170: npm error Invalid: lock file's @rolldown/binding-linux-arm64-gnu@1.0.0-beta.45 does not satisfy @rolldown/binding-linux-arm64-gnu@1.1.2171: npm error Invalid: lock file's @rolldown/binding-linux-arm64-musl@1.0.0-beta.45 does not satisfy @rolldown/binding-linux-arm64-musl@1.1.2172: npm error Missing: @rolldown/binding-linux-ppc64-gnu@1.1.2 from lock file173: npm error Missing: @rolldown/binding-linux-s390x-gnu@1.1.2 from lock file174: npm error Invalid: lock file's @rolldown/binding-linux-x64-gnu@1.0.0-beta.45 does not satisfy @rolldown/binding-linux-x64-gnu@1.1.2175: npm error Invalid: lock file's @rolldown/binding-linux-x64-musl@1.0.0-beta.45 does not satisfy @rolldown/binding-linux-x64-musl@1.1.2176: npm error Invalid: lock file's @rolldown/binding-openharmony-arm64@1.0.0-beta.45 does not satisfy @rolldown/binding-openharmony-arm64@1.1.2177: npm error Invalid: lock file's @rolldown/binding-wasm32-wasi@1.0.0-beta.45 does not satisfy @rolldown/binding-wasm32-wasi@1.1.2178: npm error Invalid: lock file's @rolldown/binding-win32-arm64-msvc@1.0.0-beta.45 does not satisfy @rolldown/binding-win32-arm64-msvc@1.1.2179: npm error Invalid: lock file's @rolldown/binding-win32-x64-msvc@1.0.0-beta.45 does not satisfy @rolldown/binding-win32-x64-msvc@1.1.2180: npm error Invalid: lock file's @rolldown/pluginutils@1.0.0-beta.45 does not satisfy @rolldown/pluginutils@1.0.1181: npm error Invalid: lock file's @babel/generator@7.29.7 does not satisfy @babel/generator@8.0.0182: npm error Invalid: lock file's @babel/helper-validator-identifier@7.29.7 does not satisfy @babel/helper-validator-identifier@8.0.2183: npm error Invalid: lock file's @babel/parser@7.29.7 does not satisfy @babel/parser@8.0.0184: npm error Invalid: lock file's ast-kit@2.2.0 does not satisfy ast-kit@3.0.0185: npm error Invalid: lock file's birpc@2.9.0 does not satisfy birpc@4.0.0186: npm error Invalid: lock file's dts-resolver@2.1.3 does not satisfy dts-resolver@3.0.0187: npm error Invalid: lock file's get-tsconfig@4.14.0 does not satisfy get-tsconfig@5.0.0-beta.5188: npm error Invalid: lock file's @babel/types@7.29.7 does not satisfy @babel/types@8.0.0189: npm error Missing: @types/jsesc@2.5.1 from lock file190: npm error Invalid: lock file's @babel/helper-string-parser@7.29.7 does not satisfy @babel/helper-string-parser@8.0.0191: npm error Missing: estree-walker@3.0.3 from lock file192: npm error Missing: @types/estree@1.0.9 from lock file193: npm error194: npm error Clean install a project195: npm error196: npm error Usage:197: npm error npm ci198: npm error199: npm error Options:200: npm error [--install-strategy <hoisted|nested|shallow|linked>] [--legacy-bundling]201: npm error [--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]202: npm error [--include <prod|dev|optional|peer> [--include <prod|dev|optional|peer> ...]]203: npm error [--strict-peer-deps] [--foreground-scripts] [--ignore-scripts] [--no-audit]204: npm error [--no-bin-links] [--no-fund] [--dry-run]205: npm error [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]206: npm error [-ws|--workspaces] [--include-workspace-root] [--install-links]207: npm error208: npm error aliases: clean-install, ic, install-clean, isntall-clean209: npm error210: npm error Run "npm help ci" for more info211: npm error A complete log of this run can be found in: /home/runner/.npm/_logs/2026-06-22T21_45_16_049Z-debug-0.log212: ##[error]Process completed with exit code 1.213: Post job cleanup.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The API client was compiled with
tscbut not bundled in a way that it could be properly consumed by an application without transpiling the dependency. In a Next.js project this would result in the failureError [ERR_MODULE_NOT_FOUND]: Cannot find module.Solution
I've migrated the project to use tsdown which is the modern iteration on the deprecated
tsupbundler. Allows us to build and export ESM and CJS bundles with very little config.Testing
I installed the new version in one of our internal projects using
npm linkand the app builds without transpilation.