-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
RuntimeConfigs not picked up #10385
Comments
Hi, thanks for giving this a try so quickly. It looks like you were using the runtime configs in a file imported by I opened a follow-up PR here to make sure the config is set before the other imports also which should match the runtime config behavior for server mode |
I was curious to see if the commit actually provides the feature that was mentioned as the title. After taking a closer look at the commit, it was somehow clear that this was the first step in creating the variables, and that more commits would follow to deliver them correctly. In any case, thank you very much for the quick response and the timely provision of the appropriate function. I will continue to test the function in the next few days and give feedback if problems occur. |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Bug report
The following commit makes publicRuntimeConfig and serverRuntimeConfig available to serverless target afc278f.
Describe the bug
Now completes the build but fails on calling the application. I get the following error when executing the application. Using now@canary in now.json.
Cannot destructure property
publicRuntimeConfig
of 'undefined' or 'null'.Tested both publicRuntimeConfig and serverRuntimeConfig on a my local machine with 9.2.2-canary.6. Here I get an Internal Server Error (500). I know not really helpful.
To Reproduce
I can not provide a repo at the moment just the branch of trying runtimeConfig on a serverless target.
Here is the branch, look at the last commit.
https://github.com/project-millipede/millipede-docs/tree/Next-FS-Test
Expected behavior
A clear and concise description of what you expected to happen.
An identical behaviour of runtime config how its currently supported in server target and described in the documentation here.
https://github.com/zeit/next.js/blob/f24aa41440b57a4c9a289ccc1fdca223f6b3a0dd/docs/api-reference/next.config.js/runtime-configuration.md
System information
Chrome
Next: 9.2.2-canary.6
Now: canary
The text was updated successfully, but these errors were encountered: