Skip to content

Breaks in React 17 project using webpack #1998

Closed

Description

@SavePointSam

Describe the bug

Similar to #1828, React 17 compatibility was broken with #1913 after being corrected in v1.27.0. Due to the issue resolved in v1.27.4, we are currently locked to v1.23.7.

ERROR in ../project/node_modules/@tanstack/react-form/dist/esm/useFormId.js 3:67-78
export 'useId' (imported as 'React') was not found in 'react' (possible exports: Children, Component, Fragment, Profiler, PureComponent, StrictMode, Suspense, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, cloneElement, createContext, createElement, createFactory, createRef, forwardRef, isValidElement, lazy, memo, useCallback, useContext, useDebugValue, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useReducer, useRef, useState, version)
 @ ../project/node_modules/@tanstack/react-form/dist/esm/useForm.js 9:0-43 21:25-34
 @ ../project/node_modules/@tanstack/react-form/dist/esm/index.js 6:0-39 7:0-101
 @ ..

Your minimal, reproducible example

I'm unable to re-create this in codesandbox using react-scripts

Steps to reproduce

  1. Create new React 17 project using webpack
  2. Install @tanstack/react-form@1.27.2
  3. Attempt to use library
  4. See crash

Expected behavior

Application is able to be built and run with React 17 and react-form v1.27.2+

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

OS: macOS
Bundler: Webpack 5

TanStack Form adapter

react-form

TanStack Form version

v1.27.2

TypeScript version

No response

Additional context

No response

Activity

  1. LeCarbonator commented on Jan 17, 2026

    @LeCarbonator
    Contributor

    So this also affects latest? (1.27.7)?

  2. LeCarbonator commented on Jan 17, 2026

    @LeCarbonator
    Contributor

    Possibly related to #1982

  3. SavePointSam commented on Jan 20, 2026

    @SavePointSam
    Author

    So this also affects latest? (1.27.7)?

    Yes, it impacts 1.27.2 to latest (1.27.7)

  4. LeCarbonator commented on Jan 21, 2026

    @LeCarbonator
    Contributor

    Does the linked PR fix it? The PR author hasn't responded yet, but you can try the PR version locally:

    npm i https://pkg.pr.new/@tanstack/react-form@1982
  5. SavePointSam commented on Jan 27, 2026

    @SavePointSam
    Author

    Does the linked PR fix it? The PR author hasn't responded yet, but you can try the PR version locally:

    npm i https://pkg.pr.new/@tanstack/react-form@1982

    Yes, I can confirm this version of the package resolves my issue

  6. SavePointSam commented on Feb 11, 2026

    @SavePointSam
    Author

    @LeCarbonator Can we get the PR merged and released?

  7. changed the title [-]react-form breaking change present in v1.27.2[/-] [+]Breaks in React 17 project using webpack[/+] on Feb 13, 2026
  8. crutchcorn commented on Feb 13, 2026

    @crutchcorn
    Contributor

    Should be fixed in 1.28.1

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions