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
On initializing the project, I receive the following error (full error statement below)
Error: Error serializing `.pagination.currentPage` returned from `getStaticProps` in "/".
Reason: `undefined` cannot be serialized as JSON. Please use `null` or omit this value.
Note that a simple solution is to remove the undefined value from pagination.current page in lib/posts.js. (This fixed the problem, but I'm not sure how to open a pull request!) Example fix (from posts.js):
Wordpress project is on a local server for development. Using XAMPP locally.
Run npm run dev and I get the following error:
Server Error
Error: Error serializing .pagination.currentPage returned from getStaticProps in "/".
Reason: undefined cannot be serialized as JSON. Please use null or omit this value.
This error happened while generating the page. Any console logs will be displayed in the terminal window.
Call Stack
isSerializable
file:///C:/html/dc3-headless-cms/node_modules/next/dist/lib/is-serializable-props.js (52:19)
Bug Report
Describe the bug
On initializing the project, I receive the following error (full error statement below)
Note that a simple solution is to remove the undefined value from pagination.current page in lib/posts.js. (This fixed the problem, but I'm not sure how to open a pull request!) Example fix (from posts.js):
Is this a regression?
Not sure, have not tried on previous version
Steps To Reproduce the error
npm run dev
and I get the following error:Server Error
Error: Error serializing
.pagination.currentPage
returned fromgetStaticProps
in "/".Reason:
undefined
cannot be serialized as JSON. Please usenull
or omit this value.This error happened while generating the page. Any console logs will be displayed in the terminal window.
Call Stack
isSerializable
file:///C:/html/dc3-headless-cms/node_modules/next/dist/lib/is-serializable-props.js (52:19)
file:///C:/html/dc3-headless-cms/node_modules/next/dist/lib/is-serializable-props.js (59:66)
Array.every
isSerializable
file:///C:/html/dc3-headless-cms/node_modules/next/dist/lib/is-serializable-props.js (56:39)
file:///C:/html/dc3-headless-cms/node_modules/next/dist/lib/is-serializable-props.js (59:66)
Array.every
isSerializable
file:///C:/html/dc3-headless-cms/node_modules/next/dist/lib/is-serializable-props.js (56:39)
isSerializableProps
file:///C:/html/dc3-headless-cms/node_modules/next/dist/lib/is-serializable-props.js (79:12)
renderToHTML
file:///C:/html/dc3-headless-cms/node_modules/next/dist/server/render.js (493:118)
process.processTicksAndRejections
node:internal/process/task_queues (95:5)
async doRender
file:///C:/html/dc3-headless-cms/node_modules/next/dist/server/base-server.js (1029:34)
async cacheEntry.responseCache.get.incrementalCache.incrementalCache
file:///C:/html/dc3-headless-cms/node_modules/next/dist/server/base-server.js (1159:28)
async
file:///C:/html/dc3-headless-cms/node_modules/next/dist/server/response-cache/index.js (99:36)
Expected behaviour
Project would open on http://localhost:3000 without issue
CodeSandbox or Live Example of Bug
Screenshot or Video Recording
Your environment
Additional context
thanks!
The text was updated successfully, but these errors were encountered: