Replies: 1 comment
-
Hey there, The intlProvider is a most known problem, you can do these stuffs :-
Also, You need to make sure to follow this mounting formula for every jest test. You should have your mounting function inside your jestsetup.js file. Here is an example of that:
See, being a coder, if it works let it work with npm, rest this should mitigate the problems. Thank You. And if this solves, then you can follow back if possible. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, guys!
I am a Gatsby newbie and I'm following this tutorial: https://www.gatsbyjs.com/docs/creating-plugins/ to learn to create a gatsby local plugin using
react-intl
. I put the plugin in theplugins
folder in the root of the project.This is the demo code of the plugin (Demo Project Repo: https://github.com/85Ryan/gatsby-local-plugin-demo.git)
When I build the Gatsby site, it crashes with the error
WebpackError: [React Intl] Could not find required
intlobject. <IntlProvider> needs to exist in the component ancestry.
But when I publish the plugin to npm, it works fine.
Can anyone help me to find where my problem is?
Thanks!
Originally posted by @85Ryan in https://github.com/gatsbyjs/gatsby/discussions/30139
Beta Was this translation helpful? Give feedback.
All reactions