Skip to content

4.5 version causes breaking during startup #781

Closed

Description

@chironemcgarry

`Failed to compile.

./node_modules/react-draggable/build/cjs/Draggable.js 260:22
Module parse failed: Unexpected token (260:22)
File was processed with these loaders:

  • ./node_modules/babel-loader/lib/index.js
    You may need an additional loader to handle the result of these loaders.
    | // the underlying DOM node ourselves. See the README for more information.
    | findDOMNode() /: ?HTMLElement/{
return this.props?.nodeRef?.current ?? _reactDom.default.findDOMNode(this);

| }
| render() /: ReactElement/{`

Activity

  1. chironemcgarry commented on Jul 8, 2025

    @chironemcgarry
    Author

    "resolutions": { "react-draggable": "4.4.6" },

    Fixed by reverting to the old version by adding this into my package.json file

  2. STRML commented on Sep 27, 2026

    @STRML
    Collaborator

    This was generated by AI during triage.

    Fixed as of 4.6.0. The build now targets ES2019, so the shipped CJS output no longer contains optional chaining or ??, the syntax your babel-loader failed to parse. Upgrade to 4.7.2 and drop the 4.4.6 pin.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions