René's URL Explorer Experiment


Title: fix(utils): drop the .js specifiers Turbopack cannot resolve by waleedlatif1 · Pull Request #6351 · simstudioai/sim · GitHub

Open Graph Title: fix(utils): drop the .js specifiers Turbopack cannot resolve by waleedlatif1 · Pull Request #6351 · simstudioai/sim

X Title: fix(utils): drop the .js specifiers Turbopack cannot resolve by waleedlatif1 · Pull Request #6351 · simstudioai/sim

Description: Summary Staging is currently broken for every developer running the app locally. Any route whose module graph reaches the @sim/utils barrel returns 500 under next dev: Module not found: Can't resolve './errors.js' > 1 | export { getErrorMessage, getPostgresErrorCode, toError } from './errors.js' Import trace: ./packages/utils/src/index.ts ./apps/sim/lib/embeddings/client.ts ./apps/sim/lib/knowledge/embeddings.ts ./apps/sim/app/api/knowledge/route.ts packages/utils/src/index.ts addresses its siblings as ./errors.js while the files are ./errors.ts. webpack rewrites that via resolve.extensionAlias; Turbopack has no equivalent — vercel/next.js#82945. next build is webpack. next dev is Turbopack. So this shape passes CI and breaks every dev server — which is exactly what happened: #6317's CI was fully green. Nothing required the extensions. The repo is on moduleResolution: "bundler" and no other package barrel uses them. Changes Two fixes, either of which resolves the symptom. Both are here because they fail differently: packages/utils/src/index.ts — drops all 12 .js specifiers. Fixes the barrel for every current and future consumer. apps/sim/lib/embeddings/client.ts — imports chunkArray from @sim/utils/helpers instead of the barrel. #6317 added the only bare-barrel @sim/utils import in the monorepo; the subpath form is the documented convention (CLAUDE.md, "Common Utilities") and resolves to one module instead of pulling twelve. scripts/check-import-specifiers.ts (new, wired into CI) — fails the build on either shape. Type of Change Bug fix Testing Verified against a real bun run dev:full with production env vars: Route before after GET /api/knowledge 500 401 POST /api/tools/embeddings 500 401 POST /api/workflows/[id]/deploy 500 401 GET /workspace 200 (chrome only) 200 Turbopack log free of Module not found after the fix bunx tsc --noEmit — 0 errors packages/utils — 147/147 tests pass apps/realtime boots normally (it consumes @sim/utils under Bun, unaffected either way) The guard was verified to fail, not just to pass — restoring both halves of the bug produces: ✗ 12 '.js' specifier(s) in TypeScript source: packages/utils/src/index.ts:1 './errors.js' ... ✗ 1 bare @sim/* barrel import(s): apps/sim/lib/embeddings/client.ts:1 '@sim/utils' It scans only bundler-compiled source — vitest and standalone bun run scripts resolve .js → .ts themselves, so flagging their specifiers would be noise (11 such pre-existing cases are correctly ignored). Note on the underlying gap This is the second bug in two days that CI could not see because CI builds with webpack while developers run Turbopack. The other was the triggers↔blocks init cycle (#6342), which also produced a dev-only 500 while next build stayed green. Worth considering a next build --turbopack job, or a cheap route module-init smoke test, so dev-only resolution and initialization failures are caught before merge rather than by whoever pulls staging next. Checklist Code follows project style guidelines Self-reviewed my changes Relevant tests are passing No new warnings introduced

Open Graph Description: Summary Staging is currently broken for every developer running the app locally. Any route whose module graph reaches the @sim/utils barrel returns 500 under next dev: Module not found: Can't r...

X Description: Summary Staging is currently broken for every developer running the app locally. Any route whose module graph reaches the @sim/utils barrel returns 500 under next dev: Module not found: Can&#39...

Opengraph URL: https://github.com/simstudioai/sim/pull/6351

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:e9024d0e-4b1b-ecb0-ba50-9b89eff8e783
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8284:2E7BAB:A8F537:E8C532:6AFB5232
html-safe-noncec05e0ee37384c32ee061075a3333ab5a564d1ae20d3c78474c6ed9676ea6f9e0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4Mjg0OjJFN0JBQjpBOEY1Mzc6RThDNTMyOjZBRkI1MjMyIiwidmlzaXRvcl9pZCI6IjEzOTgyMTc4MzAzODk0Njk3NDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac499191834e00fab509631e06215574e2cb664aac58a8b5282c28e6f246ab16be
hovercard-subject-tagpull_request:4224463839
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/6351/files
twitter:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
og:image:altSummary Staging is currently broken for every developer running the app locally. Any route whose module graph reaches the @sim/utils barrel returns 500 under next dev: Module not found: Can't r...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None7122bb414b542dba14d71a3f0b9f6fd2abce715b9f5912d082800563e6c806d1
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/simstudioai/sim git https://github.com/simstudioai/sim.git
octolytics-dimension-user_id199344406
octolytics-dimension-user_loginsimstudioai
octolytics-dimension-repository_id912559512
octolytics-dimension-repository_nwosimstudioai/sim
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id912559512
octolytics-dimension-repository_network_root_nwosimstudioai/sim
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasecbf66c024bb6d10e6955baa7413c54cf13a201bb
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/6351/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6351%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6351%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/pull/6351/files
Reloadhttps://github.com/simstudioai/sim/pull/6351/files
Reloadhttps://github.com/simstudioai/sim/pull/6351/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests197 (197)https://github.com/simstudioai/sim/pulls
Actionshttps://github.com/simstudioai/sim/actions
Projectshttps://github.com/simstudioai/sim/projects
Security and qualityhttps://github.com/simstudioai/sim/security
Insightshttps://github.com/simstudioai/sim/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
waleedlatif1https://github.com/waleedlatif1
staginghttps://github.com/simstudioai/sim/tree/staging
fix/turbopack-js-specifier-resolutionhttps://github.com/simstudioai/sim/tree/fix/turbopack-js-specifier-resolution
Conversation 25 https://github.com/simstudioai/sim/pull/6351
Commits 7 https://github.com/simstudioai/sim/pull/6351/commits
Checks 30 https://github.com/simstudioai/sim/pull/6351/checks
Files changed https://github.com/simstudioai/sim/pull/6351/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6351/files
fix(utils): drop the .js specifiers Turbopack cannot resolve https://github.com/simstudioai/sim/pull/6351/files#top
Show all changes 7 commits https://github.com/simstudioai/sim/pull/6351/files
1c6073e fix(utils): drop the .js specifiers Turbopack cannot resolve waleedlatif1 Aug 6, 2026 https://github.com/simstudioai/sim/pull/6351/commits/1c6073e0f0295692b519e68d99a1ee2103ff4e24
6112f9d refactor(scripts): resolve specifiers instead of pattern-matching one… waleedlatif1 Aug 6, 2026 https://github.com/simstudioai/sim/pull/6351/commits/6112f9d32592bf3ee51ab0133989792c109f1599
9b7921f fix(scripts): close three coverage gaps in the specifier audit waleedlatif1 Aug 6, 2026 https://github.com/simstudioai/sim/pull/6351/commits/9b7921f76b64d9e14a885090f5132d70d4c0a337
93c5686 chore(tools): regenerate the stale tool metadata waleedlatif1 Aug 6, 2026 https://github.com/simstudioai/sim/pull/6351/commits/93c568604d61465e9fb63a411235e644eb207fc2
3f7c152 fix(scripts): substitute every wildcard in a resolved target waleedlatif1 Aug 7, 2026 https://github.com/simstudioai/sim/pull/6351/commits/3f7c152f5da80b3c56f6fa9f22027ed777aeccdc
52d6e80 fix(scripts): do not assert on generated output in the specifier audit waleedlatif1 Aug 7, 2026 https://github.com/simstudioai/sim/pull/6351/commits/52d6e80876861a6391152d11f90d99e6fcbc996f
f1c0fce refactor(scripts): trim the specifier audit's comments waleedlatif1 Aug 7, 2026 https://github.com/simstudioai/sim/pull/6351/commits/f1c0fceecd1aa050a992d9465d9207a9e28c0431
Clear filters https://github.com/simstudioai/sim/pull/6351/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6351/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6351/files
test-build.yml https://github.com/simstudioai/sim/pull/6351/files#diff-a583f7935a5f3192471a2999cbf059eadc857228b5be2c7247f481b799949f8d
client.ts https://github.com/simstudioai/sim/pull/6351/files#diff-bff32d70819c246fcf759a2ace839aa7e4569d2c62cf0658c5d2613a89d1170c
tool-metadata.ts https://github.com/simstudioai/sim/pull/6351/files#diff-3a953213cad2b14799015043b75c22cd4815397d3a43ccbf138816bedfdfccd7
package.json https://github.com/simstudioai/sim/pull/6351/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519
index.ts https://github.com/simstudioai/sim/pull/6351/files#diff-4de4f541bddba72ba0a8692d8e366b2b8498d0a1bae6d3cb225fd3346571d567
check-import-specifiers.ts https://github.com/simstudioai/sim/pull/6351/files#diff-675a4765f8e1a2b3b839738c9f1818daa0a031875beafadcd59a5eb7a6a1d3d2
.github/workflows/test-build.ymlhttps://github.com/simstudioai/sim/pull/6351/files#diff-a583f7935a5f3192471a2999cbf059eadc857228b5be2c7247f481b799949f8d
View file https://github.com/simstudioai/sim/blob/f1c0fceecd1aa050a992d9465d9207a9e28c0431/.github/workflows/test-build.yml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6351/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6351/files#diff-a583f7935a5f3192471a2999cbf059eadc857228b5be2c7247f481b799949f8d
https://github.com/simstudioai/sim/pull/6351/files#diff-a583f7935a5f3192471a2999cbf059eadc857228b5be2c7247f481b799949f8d
apps/sim/lib/embeddings/client.tshttps://github.com/simstudioai/sim/pull/6351/files#diff-bff32d70819c246fcf759a2ace839aa7e4569d2c62cf0658c5d2613a89d1170c
View file https://github.com/simstudioai/sim/blob/f1c0fceecd1aa050a992d9465d9207a9e28c0431/apps/sim/lib/embeddings/client.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6351/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6351/files#diff-bff32d70819c246fcf759a2ace839aa7e4569d2c62cf0658c5d2613a89d1170c
apps/sim/tools/generated/tool-metadata.tshttps://github.com/simstudioai/sim/pull/6351/files#diff-3a953213cad2b14799015043b75c22cd4815397d3a43ccbf138816bedfdfccd7
View file https://github.com/simstudioai/sim/blob/f1c0fceecd1aa050a992d9465d9207a9e28c0431/apps/sim/tools/generated/tool-metadata.ts
Open in desktop https://desktop.github.com
Please reload this pagehttps://github.com/simstudioai/sim/pull/6351/files
https://github.com/simstudioai/sim/blob/staging/.github/CODEOWNERS#L36
package.jsonhttps://github.com/simstudioai/sim/pull/6351/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519
View file https://github.com/simstudioai/sim/blob/f1c0fceecd1aa050a992d9465d9207a9e28c0431/package.json
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6351/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6351/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519
https://github.com/simstudioai/sim/pull/6351/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519
packages/utils/src/index.tshttps://github.com/simstudioai/sim/pull/6351/files#diff-4de4f541bddba72ba0a8692d8e366b2b8498d0a1bae6d3cb225fd3346571d567
View file https://github.com/simstudioai/sim/blob/f1c0fceecd1aa050a992d9465d9207a9e28c0431/packages/utils/src/index.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6351/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6351/files#diff-4de4f541bddba72ba0a8692d8e366b2b8498d0a1bae6d3cb225fd3346571d567
https://github.com/simstudioai/sim/pull/6351/files#diff-4de4f541bddba72ba0a8692d8e366b2b8498d0a1bae6d3cb225fd3346571d567
Please reload this pagehttps://github.com/simstudioai/sim/pull/6351/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6351/files
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.