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
Jest: Cannot find module @vercel/analytics/react from src/pages/_app.tsx #22
Comments
Hey @bitabs, thanks for raising this. We'll get investigating! I suspect it's something to do with how the module is packaged... Are you just using a blitzjs starter? Is there a minimal repro you can share? I'm not overly familiar with blitz :D |
Hya 👋🏻 @dglsparsons - Yes, It's a Blitz starter indeed. Can you please try the starter? |
Hey @bitabs! Sorry, but I'm struggling to reproduce this - I'm being frustratingly blocked on this Blitz issue which means I'm struggling to get any tests to work at all in Blitz. I was, however, able to set up a brand new NextJS project based on the NextJS Jest Example. Adding Analytics to this in either the _app.tsx file, or in a specific page gave me no issues at all though - and worked exactly as you'd expect. It seems like the issue is with the Blitz jest config because of this. However, since I'm unable to reproduce I can't confirm this. Sorry to ask again, but I don't suppose you are able to share any reproduction? |
Hey just here to add some context. We had some issues with jest & some types. There is a PR open currently to scrap jest completely and move to vitest blitz-js/blitz#3985 |
@dglsparsons I share your frustration, unfortunately. 😞 It looks like something very specific to Blitz. @dillonraphael Thanks for jumping in and adding some context 🙇. I guess I'll close this ticket for the time being 🙏🏻 |
For me it was a matter of adding this to
|
Hi there,
I'm using Blitz, and Jest test is failing:
Jest
The text was updated successfully, but these errors were encountered: