TypeError: Cannot read property 'tap' of undefined in DEV
hi, I am getting a webpack error when trying to run with this plugin in dev. Production seems to be working fine. Do you have any idea what might be causing it?
package.json
"webpack": "latest",
"next-plugin-preact": "^3.0.3",
"preact": "^10.5.10",
"preact-render-to-string": "^5.1.12",
"react": "npm:@preact/compat",
"react-dom": "npm:@preact/compat",
"react-ssr-prepass": "npm:preact-ssr-prepass",
it happens only when using:
const withPreact = require('next-plugin-preact');
I seems that the aliases in package.json make it work even so, as the build size keeps reduced even if I disable it.
cheers, dan
Seeing the same behaviour as above
Yes, next v10.0.6 breaks the plugin. For now you can fix your next dependency in your package.json =>
"next": "10.0.5",
hey @iam4x 👋
I tried downgrading to 10.0.5, but I still get the Cannot read property 'tap' of undefined error
Hey, can you run npm ls next and npm ls webpack and make sure you are using [email protected] and webpack@^5.21.2 ?


With these two versions set, and clean node_modules folder I have no issues:

npm ls next returns (empty) for some reason, but my yarn.lock correcty shows [email protected].
npm ls webpack returns 5.21.2 indeed
And I still get the error after a clean install 😞
This appears to be the same as https://github.com/JoviDeCroock/prefresh/issues/276; using webpack@^4.46.0 appears to work as a solution for this.
Hey @danielzzz is this issue still present with the newer versions of prefresh & this plugin?