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
I want to share data between my getStaticPaths function and my getStaticProps function as described in: #10933
The following answer: #10933 (comment) mentions writing the data to file in getStaticPaths and then reading the file in getStaticProps.
This works locally, but when i deploy to vercel, it fails because the generated file cannot be found. When I run npm run build. I can see that the generated file is not copied to the out_publish method.
Is there a way to copy this file during the build phase?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I want to share data between my getStaticPaths function and my getStaticProps function as described in: #10933
The following answer: #10933 (comment) mentions writing the data to file in getStaticPaths and then reading the file in getStaticProps.
This works locally, but when i deploy to vercel, it fails because the generated file cannot be found. When I run
npm run build
. I can see that the generated file is not copied to the out_publish method.Is there a way to copy this file during the build phase?
Beta Was this translation helpful? Give feedback.
All reactions