es-abstract: es-abstract@1.17.0-next.1 release breaking old applications
I am currently experiencing an issue where which was already raised by another person on stackoverflow where the latest release es-abstract@1.17.0-next.1 which is apparently being auto-installed by common libraries (redux-form, react-date) as a semver range.
Upon building the frontend with webpack and webpack dev server the following error occurs:
Error in ./~/object.entries/implementation.js
Module not found: Can't resolve 'es-abstract/2019/RequireObjectCoercible' in 'someDummyPath/host/client/node_modules/object.entries'
Upon investigating whether the path is really not existing I found out that it is indeed present -> therefore I don’t quite understand why this not being resolved properly.
We are using npm modules on a locked version state which stayed the same for a few years - but some of them install dependencies using semver ranges which leads to es-abstract@1.17.0-next.1 being installed as a peer dependency.
Since we arent the owner of the npm modules we can’t simply manually requirea locked version.
├─┬ INTERNAL_LIBRARY
│ └─┬ react-dates@10.1.1
│ ├─┬ airbnb-prop-types@2.15.0
│ │ ├─┬ function.prototype.name@1.1.2
│ │ │ └── es-abstract@1.17.0-next.1
│ │ └─┬ object.entries@1.1.1
│ │ └── es-abstract@1.17.0-next.1
│ └─┬ array-includes@3.1.0
│ └── es-abstract@1.17.0-next.1
└─┬ redux-form@6.6.2
└─┬ deep-equal@1.1.1
└─┬ regexp.prototype.flags@1.3.0
└── es-abstract@1.17.0-next.1
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 6
- Comments: 31 (11 by maintainers)
I’m having the same issue
In our case we had to change webpack
resolve.modulesto include'node_modules'instead ofpath.resolve(__dirname, 'node_modules')in order for it to find this module as a nested dependency. (1.17.0 is not deduped below)All. Check your configuration for module directories https://jestjs.io/docs/en/configuration#moduledirectories-arraystring for jest and https://webpack.js.org/configuration/resolve/ for webpack. Jest docs says An array of directory names to be searched recursively up and Setting this option will override the default, which happens to be
node_modules.@ljharb is right when he says that
I fixed that in jest in a broken scenario and it works fine now.
You updated minor version and you use #next version tag on some dependecies, I think that’s not good way, you should use #next tag for this testing phase, for example package function.prototype.name (below is package-lock.json). I suggest to revert changes and create next tag for dependencies that use es-abstract#next
Previous version
New minor version
I’d go up to v1.18.5 at this point 😃
Yup that’s works if you just use just airbnb-prop-types@2.15.0 lib that depends on
Not sure what the real issue is, but @ninosaurus’s suggestion worked.
I needed to override both dependencies from the error:
npm i -D function.prototype.name@1.1.1npm i -D object.entries@1.1.0I’ve tried making a new clean project and importing only the library that uses airbnb-prop-types and object.entries.
While running:
webpack --mode=productionthere is no error, but as soon as I switch towebpack --mode=development --watchI get the same error as in the original post.i used
yarn add es-abstract@1.18.0to resolve this issue in the main repo