Skip to content

Commit

Permalink
[docs] fix grammatical error vercel#41507 (vercel#41508)
Browse files Browse the repository at this point in the history
Closes: vercel#41507
  • Loading branch information
Rpaudel379 authored and Kikobeats committed Oct 24, 2022
1 parent 910540a commit 5117ff3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/api-reference/data-fetching/get-static-props.md
Expand Up @@ -147,7 +147,7 @@ Files can be read directly from the filesystem in `getStaticProps`.

In order to do so you have to get the full path to a file.

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.
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.

Instead you can use `process.cwd()` which gives you the directory where Next.js is being executed.

Expand Down

0 comments on commit 5117ff3

Please sign in to comment.