René's URL Explorer Experiment


Title: [Bug] ESM builds missing .js extensions in @bitgo/abstract-utxo (>=10.7.0) and @bitgo/utxo-core (>=1.24.0) · Issue #7660 · BitGo/BitGoJS · GitHub

Open Graph Title: [Bug] ESM builds missing .js extensions in @bitgo/abstract-utxo (>=10.7.0) and @bitgo/utxo-core (>=1.24.0) · Issue #7660 · BitGo/BitGoJS

X Title: [Bug] ESM builds missing .js extensions in @bitgo/abstract-utxo (>=10.7.0) and @bitgo/utxo-core (>=1.24.0) · Issue #7660 · BitGo/BitGoJS

Description: Environment Details OS: macOS / Linux (Docker) Node Version: 22.14+ Package Manager: pnpm 10.17.1 BitGoJS Version: @bitgo/abstract-utxo@10.8.0, @bitgo/utxo-core@1.25.0 BitGo Environment: Both testnet and mainnet Expected Behavior ESM bui...

Open Graph Description: Environment Details OS: macOS / Linux (Docker) Node Version: 22.14+ Package Manager: pnpm 10.17.1 BitGoJS Version: @bitgo/abstract-utxo@10.8.0, @bitgo/utxo-core@1.25.0 BitGo Environment: Both testn...

X Description: Environment Details OS: macOS / Linux (Docker) Node Version: 22.14+ Package Manager: pnpm 10.17.1 BitGoJS Version: @bitgo/abstract-utxo@10.8.0, @bitgo/utxo-core@1.25.0 BitGo Environment: Both testn...

Opengraph URL: https://github.com/BitGo/BitGoJS/issues/7660

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug] ESM builds missing .js extensions in @bitgo/abstract-utxo (\u003e=10.7.0) and @bitgo/utxo-core (\u003e=1.24.0)","articleBody":"## Environment Details\n\n- **OS:** macOS / Linux (Docker)\n- **Node Version:** 22.14+\n- **Package Manager:** pnpm 10.17.1\n- **BitGoJS Version:** `@bitgo/abstract-utxo@10.8.0`, `@bitgo/utxo-core@1.25.0`\n- **BitGo Environment:** Both testnet and mainnet\n\n## Expected Behavior\n\nESM builds in `dist/esm/` should use proper Node.js ESM-compatible imports with explicit `.js` file extensions for relative imports, allowing the packages to be consumed in ESM projects.\n\n## Current Behavior\n\nESM builds use relative imports without `.js` extensions, causing `ERR_MODULE_NOT_FOUND` errors when importing the packages in Node.js ESM environments.\n\n**Error 1 (`@bitgo/abstract-utxo`):**\n```\nError [ERR_MODULE_NOT_FOUND]: Cannot find module\n'/app/node_modules/@bitgo/abstract-utxo/dist/esm/abstractUtxoCoin'\nimported from '/app/node_modules/@bitgo/abstract-utxo/dist/esm/index.js'\n```\n\n**Error 2 (`@bitgo/utxo-core`):**\n```\nError [ERR_MODULE_NOT_FOUND]: Cannot find module 'bip174/src/lib/utils'\nimported from '/app/node_modules/@bitgo/utxo-core/dist/esm/paygo/psbt/payGoAddressProof.js'\n```\n\n## Possible Solution\n\nThe TypeScript compilation for ESM output needs to add `.js` extensions to all relative imports. This can be achieved by:\n\n1. Using `tsc-alias` or `tsconfig-paths` post-processing\n2. Setting `moduleResolution: \"NodeNext\"` with proper TypeScript configuration\n3. Using a bundler plugin like `rollup-plugin-add-import-extension`\n\n**Example of broken vs fixed imports:**\n\n```javascript\n// Current (broken)\nexport * from './abstractUtxoCoin';\nimport { foo } from './address';\nimport { checkForOutput } from 'bip174/src/lib/utils';\n\n// Expected (fixed)\nexport * from './abstractUtxoCoin.js';\nimport { foo } from './address/index.js';\nimport { checkForOutput } from 'bip174/src/lib/utils.js';\n```\n\n## Steps to Reproduce\n\n1. Create an ESM Node.js project (`\"type\": \"module\"` in package.json)\n2. Install `@bitgo/sdk-coin-zec@2.6.0` (which depends on `@bitgo/abstract-utxo@10.8.0`)\n3. Import the package:\n   ```javascript\n   import { Zec } from '@bitgo/sdk-coin-zec';\n   ```\n4. Run with Node.js 22+:\n   ```bash\n   node index.js\n   ```\n5. Observe `ERR_MODULE_NOT_FOUND` error\n\n## Affected Versions\n\n| Package | Last Working | Broken |\n|---------|--------------|--------|\n| `@bitgo/abstract-utxo` | 10.6.0 (CJS only) | \u003e=10.7.0 (ESM introduced) |\n| `@bitgo/utxo-core` | 1.23.0 (CJS only) | \u003e=1.24.0 (ESM introduced) |\n\n## Workaround\n\nWe are currently using pnpm patches to add `.js` extensions to all ESM imports:\n\n```json\n{\n  \"pnpm\": {\n    \"patchedDependencies\": {\n      \"@bitgo/abstract-utxo@10.8.0\": \"patches/@bitgo__abstract-utxo@10.8.0.patch\",\n      \"@bitgo/utxo-core@1.25.0\": \"patches/@bitgo__utxo-core@1.25.0.patch\"\n    }\n  }\n}\n```\n\nThis is not sustainable as patches need to be regenerated for each version upgrade.","author":{"url":"https://github.com/jakubswierczek","@type":"Person","name":"jakubswierczek"},"datePublished":"2025-12-01T22:27:10.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/7660/BitGoJS/issues/7660"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:ca42f0ba-9a03-6c24-2de7-eeacd4f24aaa
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB634:BB336:153317A:1B6443B:69908187
html-safe-noncecafdaffe64d0b81e37fb3872742f1d56628aa05d420488f7ef452e608ed5a978
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNjM0OkJCMzM2OjE1MzMxN0E6MUI2NDQzQjo2OTkwODE4NyIsInZpc2l0b3JfaWQiOiIxMjA5ODU3NzMxNzQ3NDE0NDA3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacaee9e4243c12a517009deb361bcecc8a3fc6ff715d20bdf15a1d62eb5fe758d7
hovercard-subject-tagissue:3683125799
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/BitGo/BitGoJS/7660/issue_layout
twitter:imagehttps://opengraph.githubassets.com/426718f24f164385aded77767e7a0f262ac82c3f1e5076491e91b45e2f57a370/BitGo/BitGoJS/issues/7660
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/426718f24f164385aded77767e7a0f262ac82c3f1e5076491e91b45e2f57a370/BitGo/BitGoJS/issues/7660
og:image:altEnvironment Details OS: macOS / Linux (Docker) Node Version: 22.14+ Package Manager: pnpm 10.17.1 BitGoJS Version: @bitgo/abstract-utxo@10.8.0, @bitgo/utxo-core@1.25.0 BitGo Environment: Both testn...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejakubswierczek
hostnamegithub.com
expected-hostnamegithub.com
None42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b
turbo-cache-controlno-preview
go-importgithub.com/BitGo/BitGoJS git https://github.com/BitGo/BitGoJS.git
octolytics-dimension-user_id6267684
octolytics-dimension-user_loginBitGo
octolytics-dimension-repository_id20121980
octolytics-dimension-repository_nwoBitGo/BitGoJS
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id20121980
octolytics-dimension-repository_network_root_nwoBitGo/BitGoJS
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release3b33c5aedc9808f45bc5fcf0b1e4404cf749dac7
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/BitGo/BitGoJS/issues/7660#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FBitGo%2FBitGoJS%2Fissues%2F7660
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FBitGo%2FBitGoJS%2Fissues%2F7660
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=BitGo%2FBitGoJS
Reloadhttps://patch-diff.githubusercontent.com/BitGo/BitGoJS/issues/7660
Reloadhttps://patch-diff.githubusercontent.com/BitGo/BitGoJS/issues/7660
Reloadhttps://patch-diff.githubusercontent.com/BitGo/BitGoJS/issues/7660
BitGo https://patch-diff.githubusercontent.com/BitGo
BitGoJShttps://patch-diff.githubusercontent.com/BitGo/BitGoJS
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2FBitGo%2FBitGoJS
Fork 301 https://patch-diff.githubusercontent.com/login?return_to=%2FBitGo%2FBitGoJS
Star 389 https://patch-diff.githubusercontent.com/login?return_to=%2FBitGo%2FBitGoJS
Code https://patch-diff.githubusercontent.com/BitGo/BitGoJS
Issues 41 https://patch-diff.githubusercontent.com/BitGo/BitGoJS/issues
Pull requests 23 https://patch-diff.githubusercontent.com/BitGo/BitGoJS/pulls
Actions https://patch-diff.githubusercontent.com/BitGo/BitGoJS/actions
Projects 0 https://patch-diff.githubusercontent.com/BitGo/BitGoJS/projects
Security 0 https://patch-diff.githubusercontent.com/BitGo/BitGoJS/security
Insights https://patch-diff.githubusercontent.com/BitGo/BitGoJS/pulse
Code https://patch-diff.githubusercontent.com/BitGo/BitGoJS
Issues https://patch-diff.githubusercontent.com/BitGo/BitGoJS/issues
Pull requests https://patch-diff.githubusercontent.com/BitGo/BitGoJS/pulls
Actions https://patch-diff.githubusercontent.com/BitGo/BitGoJS/actions
Projects https://patch-diff.githubusercontent.com/BitGo/BitGoJS/projects
Security https://patch-diff.githubusercontent.com/BitGo/BitGoJS/security
Insights https://patch-diff.githubusercontent.com/BitGo/BitGoJS/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/BitGo/BitGoJS/issues/7660
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/BitGo/BitGoJS/issues/7660
[Bug] ESM builds missing .js extensions in @bitgo/abstract-utxo (>=10.7.0) and @bitgo/utxo-core (>=1.24.0)https://patch-diff.githubusercontent.com/BitGo/BitGoJS/issues/7660#top
bughttps://github.com/BitGo/BitGoJS/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com/jakubswierczek
https://github.com/jakubswierczek
jakubswierczekhttps://github.com/jakubswierczek
on Dec 1, 2025https://github.com/BitGo/BitGoJS/issues/7660#issue-3683125799
bughttps://github.com/BitGo/BitGoJS/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.