-
카테고리
-
세부 분야
풀스택
-
해결 여부
미해결
사용 게시글 강의에서 SerializableError
23.04.17 00:45 작성 조회수 311
0
SerializableError: Error serializing `.initialState.post.loadPostsError` returned from `getServerSideProps` in "/user/[id]".
Reason: `undefined` cannot be serialized as JSON. Please use `null` or omit this value all together.
at isSerializable (/Users/js/Desktop/sansbook/node_modules/next/dist/lib/is-serializable-props.js:7:95)
at /Users/js/Desktop/sansbook/node_modules/next/dist/lib/is-serializable-props.js:7:503
at Array.every (<anonymous>)
at isSerializable (/Users/js/Desktop/sansbook/node_modules/next/dist/lib/is-serializable-props.js:7:304)
at /Users/js/Desktop/sansbook/node_modules/next/dist/lib/is-serializable-props.js:7:503
at Array.every (<anonymous>)
at isSerializable (/Users/js/Desktop/sansbook/node_modules/next/dist/lib/is-serializable-props.js:7:304)
at /Users/js/Desktop/sansbook/node_modules/next/dist/lib/is-serializable-props.js:7:503
at Array.every (<anonymous>)
at isSerializable (/Users/js/Desktop/sansbook/node_modules/next/dist/lib/is-serializable-props.js:7:304)
이 에러가 떴는데 user-[id].js에서 getServerSideProps 코드가 잘못되었다는 뜻인가요?
아니면 undefined나 null을 어떻게 처리할것인지..
잘모르겠습니다
답변을 작성해보세요.
답변 1