Skip to content

6.0 Migration Guide #62508

Open
Open

Description

Acknowledgement

  • I acknowledge that issues using this template may be closed without further explanation at the maintainer's discretion.

Comment

Placeholder

Activity

  1. jakebailey commented on Oct 31, 2025

    @jakebailey
  2. Dinesh0729 commented on Oct 31, 2025

    @Dinesh0729
  3. sujansince2003 commented on Nov 10, 2025

    @sujansince2003

    change module resolution to bundler and it will be resolved.also some packages might give some errors make sure to resolve those.

    "moduleResolution": "node10", to "moduleResolution": "bundler",

  4. dan-mcdonald commented on Mar 25, 2026

    @dan-mcdonald

    Option 'moduleResolution=node10' is deprecated

    I'm seeing this error and it is confusing. My root tsconfig.json extends @tsconfig/svelte/tsconfig.json, latest version 5.0.8 which is pretty simple:

    {
      "$schema": "https://www.schemastore.org/tsconfig",
      "_version": "5.0.0",
    
      "compilerOptions": {
        "module": "esnext",
        "moduleResolution": "bundler",
        "target": "es2017",
        /**
          Svelte Preprocess cannot figure out whether you have a value or a type, so tell TypeScript
          to enforce using `import type` instead of `import` for Types.
         */
        "verbatimModuleSyntax": true,
        /**
          To have warnings/errors of the Svelte compiler at the correct position,
          enable source maps by default.
         */
        "sourceMap": true,
    
        "strict": true,
        "esModuleInterop": true,
        "skipLibCheck": true
      }
    }

    but note that it is "bundler" is not "node10" so that's why I'm confused.

  5. RyanCavanaugh commented on Mar 25, 2026

    @RyanCavanaugh
    MemberAuthor

    Daniel McDonald (@dan-mcdonald) please log a new issue with a complete repro. Thanks!

  6. dskloetc commented on Mar 30, 2026

    @dskloetc

    My issue is similar to Daniel McDonald (@dan-mcdonald)'s. I have

    "moduleResolution": "node"
    

    but it gives

    packages/common/tsconfig.json(3,3): error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
    

    when trying to upgrade typescript from 5.9.3 to 6.0.2.
    We didn't ask for node10.

    I don't have time to try to create a small repro case right now but I wanted to share that Daniel McDonald (@dan-mcdonald) 's problem is not unique.

  7. cscnk52 commented on Mar 30, 2026

    @cscnk52

    David de Kloet (@dskloetc) For modern Typescript, you need use node16/nodenext/bundler for moduleResolution, node just an alias for node10, it has deprecated in Typescript 6.0.

    See docs for more information.

  8. dskloetc commented on Mar 30, 2026

    @dskloetc

    Cason Kervis (@cscnk52) thanks for the information. That's very helpful!
    It would have been useful if the error message had said that though :).

  9. Kimxons commented on Apr 11, 2026

    @Kimxons

    baseUrl

    In old versions of TypeScript, baseUrl was required in order to use paths. This is no longer the case, and in many projects you can simply remove baseUrl (especially if it's .).

    Otherwise, prepend the baseUrl value to each paths entry. A script to help doing this can be found at https://github.com/andrewbranch/ts-fix-baseurl

    This works okay.

  10. added a commit that references this issue on Apr 14, 2026
  11. linnbenton commented on Apr 28, 2026

    @linnbenton

    Seeing inconsistent behavior with the baseUrl deprecation warning in TS 6+ in monorepo setups (pnpm + Next.js 16).

    Even with:

    "ignoreDeprecations": "6.0"

    the warning still appears when baseUrl is inherited via extends, especially with moduleResolution: bundler/node16.

    Concern:
    baseUrl still works at compile/runtime level
    diagnostics are inconsistent across config composition
    suppression via ignoreDeprecations is not reliable in extended configs

    This feels like a partially rolled-out diagnostic deprecation without a clear, enforceable migration path for workspace-scale projects.

    Is this intended as an early signal for TS 7, or is the migration strategy still evolving for monorepo use cases?

  12. added a commit that references this issue on May 19, 2026
  13. sahin52 commented on Jun 18, 2026

    @sahin52

    This is not mentioned, but the default value of "strict" has become true
    #63087
    #62333

  14. sahin52 commented on Jun 18, 2026

    @sahin52

    Also various other changes can be found in the milestone: https://github.com/microsoft/TypeScript/milestone/218?closed=1

  15. ljharb commented on Jul 2, 2026

    @ljharb
    Contributor

    I still want node10 semantics (i don't care what the defaults are). How can I keep them in TS 7+?

  16. jakebailey commented on Jul 2, 2026

    @jakebailey
    Member

    You cannot, except to switch to bundler.

  17. ljharb commented on Jul 2, 2026

    @ljharb
    Contributor

    Jake Bailey (@jakebailey) what's the difference between bundler and node10?

    and why remove it? people who want to support old nodes can't use types anymore?

  18. andrewbranch commented on Jul 3, 2026

    @andrewbranch
    Member

    The closest you can get is to use node16 or bundler, resolvePackageJsonImports and resolvePackageJsonExports, and ensure your own code is using "type": "commonjs" or no "type" at all.

    node10 has no concept of the difference between runtime ESM and runtime CJS code, basically assuming that all code in the universe is CJS and that export default foo means ~exports.__esModule = true; exports.default = foo.

    bundler has an understanding of what files are ESM and CJS but assumes it will all interop nicely. It also respects package.json "exports" and "imports" by default, and even when it knows a file is ESM, it supports directory modules and extension searching, like Node.js’s CJS resolution algorithm.

    node16 treats ESM like ESM and CJS like CJS, according to how Node.js 16 identifies and treats ESM and CJS.

    There is of course a maintenance cost to being able to model the modules support of an infinite range of Node.js versions within a single version of TypeScript. We think dropping node10 from our list of algorithms we continue to maintain at this point is reasonably conservative, but it shouldn't impact your ability to support users with old Node.js. You probably test your code against old Node.js versions. You can also test your types against old versions of TypeScript.

  19. ljharb commented on Jul 3, 2026

    @ljharb
    Contributor

    In latest node, all code in the universe is CJS (or, is ESM), because they're basically indistinguishable.

    Testing against multiple versions of TS is prohibitively hard; TS 6 doesn't even work with the syntax in @types/node below like v8.

    I'll go with bundler but considering that https://npmjs.com/resolve @next already models every single possible permutation of node's resolution algorithms, and the work is done for you, i think the maintenance cost is pretty close to zero.

  20. xr0master commented on Jul 20, 2026

    @xr0master

    Jordan Harband (@ljharb) the node 10 is dead, officially dead a long time ago. It is better for you to update your code than to ask libraries to support legacy versions. IMHO
    https://nodejs.org/en/about/previous-releases

  21. ljharb commented on Sep 30, 2026

    @ljharb
    Contributor

    xr0master no, it's just not supported. even if it was actually dead (no usage), equivalent browsers are still VERY MUCH in use, and these browsers should be delivered type-checked code too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    DiscussionIssues which may not have code impact

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions