The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object.
JSON stringfy 를 사용해서 집어넣어도 에러가 떴다.
에러난 코드 : Buffer.from(JSON.stringfy(userid));
해결 방법 :
그래서 JSON.stringfy를 한 userid 변수를 따로뺐다.
그럼에도 같은 오류가 나서 template literral 을 사용해서 넣어줬더니 정상적으로 작동했다.
수정 코드 :
let newUserid = JSON.stringfy(userid);
Buffer.from(`${newUserid}`);
react.js?28cc:76 Uncaught TypeError: Cannot read properties of undefined (reading 'subscribe')
module not found 404오류
해결방법 :
쿠키를 저장해서 그 쿠키값의 존재 여부를 상위 컴포넌트에서 검사를 했는데 쿠키 값이 없을 경우의 설정을 안해줘서 발생한 오류였다.
없을 경우의 if문을 돌려줬더니 해결 되었다.
Origin null is not allowed by Access-Control-Allow-Origin.
해결방법 :
CORS에러. withCredentials:true옵션을 넣어줬더니 해결 되었다.
exios post 404/500에러가 많이 떴는데 대부분 백단 설정 문제거나 필요없는 변수를 import 해왔을때도 오류가 발생했었다.
해결방법 :
- logoutSaga에서 axios get을 할때 withCredentials:true옵션을 넣었을때도 발생했었다.
Warning: Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?
해결방법 :
에러 내용 그대로 Context 객체를 Context.Consumer라고 바꿔주니 작동했다.
미해결 오류
redux-persist failed to create sync storage. falling back to noop storage. nextjs
회원가입을 마칠때 rpc통신으로 지갑주소를 받아오려고 했는데 그때 토큰 유지를 위해 사용했던 redux-persist와 충돌해서 에러가 발생했다.
해결 못 함
Cannot set headers after they are sent to the client
로그아웃 버튼 눌렀을때 쿠키를 삭제하려고 res.함수를 사용하면 위와 같은 오류가 발생한다.
해결 못 함
'Lecture' 카테고리의 다른 글
[typescript] VsCode에서 타입스크립트 실행방법 (0) | 2021.10.26 |
---|---|
스마트컨트렉트 (0) | 2021.10.08 |
nodemon, morgan (0) | 2021.09.28 |
[지갑 실행] BITCOIN CORE 실행 (0) | 2021.09.13 |
shell 명령어 (0) | 2021.09.09 |