Skip to content

2.4.3 fails to compile with webpack v5.106.2 on node v26.0.0 and react v19.2.6 #757

@pjg

Description

@pjg

React application without typescript. Webpack compilation fails with the following errors:

 ERROR in ./node_modules/formsy-react/dist/index.js 1:0-49
  Module not found: Error: Can't resolve 'lodash/isPlainObject' in '/Users/**/node_modules/formsy-react/dist'
  Did you mean 'isPlainObject.js'?
  BREAKING CHANGE: The request 'lodash/isPlainObject' failed to resolve only because it was resolved as fully specified
  (probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
  The extension in the request is mandatory for it to be fully specified.
  Add the extension to the request.

  ERROR in ./node_modules/formsy-react/dist/index.js 3:0-29
  Module not found: Error: Can't resolve 'lodash/set' in '/Users/**/node_modules/formsy-react/dist'
  Did you mean 'set.js'?
  BREAKING CHANGE: The request 'lodash/set' failed to resolve only because it was resolved as fully specified
  (probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
  The extension in the request is mandatory for it to be fully specified.
  Add the extension to the request.

  ERROR in ./node_modules/formsy-react/dist/index.js 4:0-29
  Module not found: Error: Can't resolve 'lodash/has' in '/Users/**/node_modules/formsy-react/dist'
  Did you mean 'has.js'?
  BREAKING CHANGE: The request 'lodash/has' failed to resolve only because it was resolved as fully specified
  (probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
  The extension in the request is mandatory for it to be fully specified.
  Add the extension to the request.

  ERROR in ./node_modules/formsy-react/dist/index.js 5:0-29
  Module not found: Error: Can't resolve 'lodash/get' in '/Users/**/node_modules/formsy-react/dist'
  Did you mean 'get.js'?
  BREAKING CHANGE: The request 'lodash/get' failed to resolve only because it was resolved as fully specified
  (probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
  The extension in the request is mandatory for it to be fully specified.
  Add the extension to the request.

The same failure can be reproduced on node v24.15.0.

Pretty sure it's because of #747

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions