Open shorif2000 opened 4 years ago
I faced this issue today and wasted an hour trying to fix it by playing with the versions in the resolutions
in package.json
and I used npm-force-resolutions to force the correct version in all my dependencies.
unfortunately, I couldn't figure out a solution BUT I have a workaround if someone is using webpack
as you can see from the error message somewhere in your dependencies the code tries to import from dom-helpers/scrollbarSize
but in dom-helpers
the scrollbarSize is inside dom-helpers/uitl/scrollbarSize
so as a solution I added an alias for dom-helpers/scrollbarSize
to point to the correct place
webpack.config.js
module.exports = {
entry: {
.....
},
output: {
...
},
module: {
rules: [....]
},
resolve: {
modules: [
path.resolve('./node_modules')
],
alias: {
'dom-helpers/scrollbarSize': path.resolve(__dirname, 'node_modules', 'dom-helpers', 'util', 'scrollbarSize'),
.....
}
},
plugins: [...]
};
just a temp solution I guess
just a guess: there is a mock of dom-helpers/scrollbarSize
in https://github.com/bvaughn/react-virtualized/blob/master/source/jest-setup.js
I think you should try and import this file in your jest
's setupTests.js
file
I am receiving this all of a sudden. If you webpack the following packages it will error.