next.js icon indicating copy to clipboard operation
next.js copied to clipboard

Failed to load next.config.js, see more info here https://nextjs.org/docs/messages/next-config-error TypeError: Cannot read properties of null (reading '0')

Open mengyi-dev opened this issue 2 years ago • 1 comments

Verify canary release

  • [X] I verified that the issue exists in the latest Next.js canary release

Provide environment information

image

Which example does this report relate to?

Nextjs with WordPress

What browser are you using? (if relevant)

Chrome

How are you deploying your application? (if relevant)

Localhost

Describe the Bug

When I try to use WP_API_URL in localhost doesn't work, but when I use WP_API_URL on cloud instance it worked

Expected Behavior

work

To Reproduce

image

mengyi-dev avatar Nov 15 '22 02:11 mengyi-dev

Hi, assuming you refer to the cms-wordpress example, Make sure you spell the environment variable correctly. It's WORDPRESS_API_URL, not WP_API_URL.

https://github.com/vercel/next.js/blob/0e8f2412ae35ab50902ae13350e897e9a6123d4d/examples/cms-wordpress/.env.local.example#L1

It might also be related to https://github.com/vercel/next.js/issues/36691, although the error there is slightly different. Could you maybe attach a full reproduction so we can verify?

balazsorban44 avatar Nov 15 '22 10:11 balazsorban44

This issue has been automatically closed because it received no activity for a month and had no reproduction to investigate. If you think it was closed by accident, please leave a comment. If you are running into a similar issue, please open a new issue with a reproduction. Thank you.

balazsorban44 avatar Dec 17 '22 23:12 balazsorban44

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

github-actions[bot] avatar Jan 17 '23 00:01 github-actions[bot]