You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since Next.js compiles your code into a separate directory you can't use __dirname as the path it will return will be different from the pages directory.
solution:
Since Next.js compiles your code into a separate directory you can't use __dirname as the path it returns will be different from the pages directory.
Is there any context that might help us understand?
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.
What is the improvement or update you wish to see?
When visiting this documentation (https://nextjs.org/docs/api-reference/data-fetching/get-static-props), on (https://nextjs.org/docs/api-reference/data-fetching/get-static-props#reading-files-use-processcwd) you can see the grammatical error on the third sentence .
error:
Since Next.js compiles your code into a separate directory you can't use __dirname as the path
it will return will be
different from the pages directory.solution:
Since Next.js compiles your code into a separate directory you can't use __dirname as the path
it returns will be
different from the pages directory.Is there any context that might help us understand?
Visit (https://nextjs.org/docs/api-reference/data-fetching/get-static-props#reading-files-use-processcwd)
Does the docs page already exist? Please link to it.
https://nextjs.org/docs/api-reference/data-fetching/get-static-props
The text was updated successfully, but these errors were encountered: