You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: Webpack CompLooked for and couldn't find the file at the following paths:resolve 'util' in '/home/dan/work/braiins/main/web-ui/.yarn/unplugged/cucumber-expressions-npm-5.0.18-9e757759dc/node_modules/cucumber-expressions/dist/src'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
We use cypress with cypress-cucumber-preprocessor & cypress-webpack-preprocessor-v5 (a temporary fork of @cypress/webpack-preprocessor for webpack 5 support until official release)
The text was updated successfully, but these errors were encountered:
That is a good point & the process of making our aforementioned setup is more complex anyway.
In general it is good to have less dependencies anyway (for more than security reasons, but those should suffice) & ideally non that are bound to specific platform (node, browser) if that is not necessary…
Summary
Webpack 5 has droped automatic pollyfilling of builtin nodejs modules so now we have this error:
Possible Solution
add
util
to dependencies ofcucumber-expressions
Your Environment
We use
cypress
withcypress-cucumber-preprocessor
&cypress-webpack-preprocessor-v5
(a temporary fork of@cypress/webpack-preprocessor
for webpack 5 support until official release)The text was updated successfully, but these errors were encountered: