René's URL Explorer Experiment


Title: Auto-import not working for modules that are indirect dependencies · Issue #35023 · microsoft/TypeScript · GitHub

Open Graph Title: Auto-import not working for modules that are indirect dependencies · Issue #35023 · microsoft/TypeScript

X Title: Auto-import not working for modules that are indirect dependencies · Issue #35023 · microsoft/TypeScript

Description: TypeScript Version: 3.7.2 Issue I noticed that auto-import in VS Code stopped working for some of my projects after updating to TS 3.7 (everything worked in 3.6). After some digging I noticed that the Language Server logs included the li...

Open Graph Description: TypeScript Version: 3.7.2 Issue I noticed that auto-import in VS Code stopped working for some of my projects after updating to TS 3.7 (everything worked in 3.6). After some digging I noticed that ...

X Description: TypeScript Version: 3.7.2 Issue I noticed that auto-import in VS Code stopped working for some of my projects after updating to TS 3.7 (everything worked in 3.6). After some digging I noticed that ...

Opengraph URL: https://github.com/microsoft/TypeScript/issues/35023

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Auto-import not working for modules that are indirect dependencies","articleBody":"**TypeScript Version:**  3.7.2\r\n\r\n**Issue**\r\n\r\nI noticed that auto-import in VS Code stopped working for some of my projects after updating to TS 3.7 (everything worked in 3.6). After some digging I noticed that the Language Server logs included the line \"`forEachExternalModuleToImportFrom: filtered out XX modules by package.json contents`\".\r\n\r\n**In short, any module that isn't directly included in `package.json` seems to be _no longer_ considered for auto-import by TS 3.7.** This includes indirect dependencies: modules that are dependencies of modules that are in fact included in `package.json`.\r\n\r\nFor example, module 'my-web-lib' that has a dependency on 'my-lib' is in my package.json; but if I don't also include 'my-lib' in my package.json explicitly, the Language Server will no longer consider auto-importing from 'my-lib'. This used to work fine, which I found useful for 'meta' packages that import a bunch of versioned dependencies in one go, or perhaps a combined node/web package that's imported indirectly using web-specific or node-specific packages without having to mention (and version) the final packages.\r\n\r\nNow that I know what's going on, this seems like a trivial issue ('just add the indirect dependency to my package'). This is possibly a new _feature_ in TS 3.7, but I can't find it in the change logs. Just in case this is an unintended side effect of some other change, I'll create this issue here. Also in case others are confused as well, this issue might help them figure out what's going on.\r\n\r\n**Code**\r\nThis issue is related to NPM dependencies, so requires a bit of setup. Essentially, add a package.json dependency (or dev dependency) that itself has a dependency on a module that exports TypeScript types. Then try to import a symbol from the second-level dependency.\r\n\r\nI have a few specific examples but since I'm updating my repos to eradicate this issue, I won't leave any links here for now; please let me know if you need me to set up a repo.\r\n\r\n**Expected behavior:**\r\n\r\nAs above, auto-import like it used to work in 3.6.\r\n\r\n**Actual behavior:**\r\n\r\nAs above, indirect dependencies are no longer considered for auto-import.\r\n\r\n**Search Terms:** Auto-import indirect dependencies NPM modules d.ts","author":{"url":"https://github.com/jcormont","@type":"Person","name":"jcormont"},"datePublished":"2019-11-10T05:57:47Z","url":"https://github.com/microsoft/TypeScript/issues/35023"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:e355e33d-826a-7ce9-d03c-40efa3ea0ab1
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idED3E:882E2:D2533C:116D4D6:6B00F57B
html-safe-nonce43580d67049ba9e8df9add04c137afd6cfbd7faefaa182f98fa43f836b8f0c8e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRDNFOjg4MkUyOkQyNTMzQzoxMTZENEQ2OjZCMDBGNTdCIiwidmlzaXRvcl9pZCI6IjI3NDMyOTA2MDEyNDcxNDMyOTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac807b0c24fdb22538e4ff995d94071353706d0e150b58e677471578166b169802
hovercard-subject-tagissue:520558737
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/microsoft/TypeScript/35023/issue_layout
twitter:imagehttps://opengraph.githubassets.com/5ae262f649add920e00022cdfa99fdde7583a7818d9b79874cd3d4564f01dab1/microsoft/TypeScript/issues/35023
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/5ae262f649add920e00022cdfa99fdde7583a7818d9b79874cd3d4564f01dab1/microsoft/TypeScript/issues/35023
og:image:altTypeScript Version: 3.7.2 Issue I noticed that auto-import in VS Code stopped working for some of my projects after updating to TS 3.7 (everything worked in 3.6). After some digging I noticed that ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejcormont
hostnamegithub.com
expected-hostnamegithub.com
None4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc
turbo-cache-controlno-preview
go-importgithub.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id20929025
octolytics-dimension-repository_nwomicrosoft/TypeScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id20929025
octolytics-dimension-repository_network_root_nwomicrosoft/TypeScript
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
release9983dd5da06943f833c971dd5b6bc988e2858be5
ui-targetcanary-2
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/35023#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F35023
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%2Fmicrosoft%2FTypeScript%2Fissues%2F35023
Sign uphttps://github.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=microsoft%2FTypeScript
Reloadhttps://github.com/microsoft/TypeScript/issues/35023
Reloadhttps://github.com/microsoft/TypeScript/issues/35023
Reloadhttps://github.com/microsoft/TypeScript/issues/35023
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests308 (308)https://github.com/microsoft/TypeScript/pulls
Actionshttps://github.com/microsoft/TypeScript/actions
Projectshttps://github.com/microsoft/TypeScript/projects
Wikihttps://github.com/microsoft/TypeScript/wiki
Security and qualityhttps://github.com/microsoft/TypeScript/security
Insightshttps://github.com/microsoft/TypeScript/insights
https://github.com/microsoft/TypeScript
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/35023
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/35023
Auto-import not working for modules that are indirect dependencieshttps://github.com/microsoft/TypeScript/issues/35023#top
Working as IntendedThe behavior described is the intended behavior; this is not a bughttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Working%20as%20Intended%22
https://github.com/jcormont
Jelmer Cormont (jcormont)https://github.com/jcormont
on Nov 10, 2019https://github.com/microsoft/TypeScript/issues/35023#issue-520558737
Jelmer Cormont (jcormont)https://github.com/jcormont
on Nov 10, 2019https://github.com/microsoft/TypeScript/issues/35023#event-2785804135
https://github.com/fatcerberus
Bruce Pascoe (fatcerberus)https://github.com/fatcerberus
on Nov 10, 2019https://github.com/microsoft/TypeScript/issues/35023#issuecomment-552170750
#32517https://github.com/microsoft/TypeScript/pull/32517
https://github.com/jcormont
Jelmer Cormont (jcormont)https://github.com/jcormont
on Nov 10, 2019https://github.com/microsoft/TypeScript/issues/35023#issuecomment-552191369
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Working as IntendedThe behavior described is the intended behavior; this is not a bughttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Working%20as%20Intended%22
on Nov 12, 2019https://github.com/microsoft/TypeScript/issues/35023#event-2792466375
https://github.com/typescript-bot
TypeScript Bot (typescript-bot)https://github.com/typescript-bot
on Nov 14, 2019https://github.com/microsoft/TypeScript/issues/35023#issuecomment-554054632
TypeScript Bot (typescript-bot)https://github.com/typescript-bot
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Nov 14, 2019https://github.com/microsoft/TypeScript/issues/35023#event-2800389045
microsofthttps://github.com/microsoft
on Oct 21, 2025https://github.com/microsoft/TypeScript/issues/35023#event-20416820118
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/35023
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/35023
Working as IntendedThe behavior described is the intended behavior; this is not a bughttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Working%20as%20Intended%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.