-
Notifications
You must be signed in to change notification settings - Fork 26.7k
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
Cannot destructure property publicRuntimeConfig
of 'undefined' or 'null'. (v9.5.0)
#15568
Comments
publicRuntimeConfig
of 'undefined' or 'null'.publicRuntimeConfig
of 'undefined' or 'null'. (v9.5.0)
Looks like the results of |
It seems to be related to lerna & different not being installed correctly, installing it in the root of the project with |
I installed a package & this error is back, also in dev mode! Also tried 9.5.1. |
Oke, so I found the situation when this is happening. I use next-transpile-modules to import modules from a different component package. But when I try to call |
I encountered this same error when using yarn workspaces with one workspace depending on next 9.4 and another 9.5. updating next to the latest version in all workspaces resolved it for me. |
I've got the same error too, when I've introduced getStaticProps. Version of Next.js: 9.5.1 |
I am geting this error in Next 9.5.5 under jest tests, just checking if my component isDefined |
I started to get this error when I updated from v10.0.6 to v10.0.7 |
I'm getting that error too I'm on v10.0.7 but had it since v9.5 |
I also have next-transpile-modules in my next.config.js and running into this issue when running my tests? Any recommendations? |
I had this issue with npm workspaces. turns out i was calling next from the workspace |
@gushiguera I have the same situation as you. What I did is mock it with jest. |
I solved this issue with this lines in jest.setup file:
|
For those who encounter this running jest, here is a fix tested
Changing the above to |
Bug report
After upgrading from 9.4.4 to 9.5.0 I get an error after building (in dev mode all works fine):
Code:
System information
The text was updated successfully, but these errors were encountered: