Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read property 'tap' of undefined in DEV #19

Open
danielzzz opened this issue Jan 20, 2021 · 7 comments
Open

TypeError: Cannot read property 'tap' of undefined in DEV #19

danielzzz opened this issue Jan 20, 2021 · 7 comments

Comments

@danielzzz
Copy link

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

@Drew-Garratt
Copy link

Seeing the same behaviour as above

@iam4x
Copy link

iam4x commented Feb 8, 2021

Yes, next v10.0.6 breaks the plugin. For now you can fix your next dependency in your package.json =>

"next": "10.0.5",

@ronanlevesque
Copy link

hey @iam4x 👋

I tried downgrading to 10.0.5, but I still get the Cannot read property 'tap' of undefined error

@iam4x
Copy link

iam4x commented Feb 9, 2021

Hey, can you run npm ls next and npm ls webpack and make sure you are using next@10.0.5 and webpack@^5.21.2 ?

image

image

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

image

@ronanlevesque
Copy link

npm ls next returns (empty) for some reason, but my yarn.lock correcty shows next@10.0.5.

npm ls webpack returns 5.21.2 indeed

And I still get the error after a clean install 😞

@mvarendorff
Copy link

mvarendorff commented Feb 23, 2021

This appears to be the same as preactjs/prefresh#276; using webpack@^4.46.0 appears to work as a solution for this.

@JoviDeCroock
Copy link
Member

Hey @danielzzz is this issue still present with the newer versions of prefresh & this plugin?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants