본문 바로가기
반응형

오류백과7

[ git ] 보안 취약점 알림 - We found potential security vulnerabilities in your dependencies. 문제 상황 We found potential security vulnerabilities in your dependencies. "종속 항목에서 잠재적인 보안 취약성을 발견했습니다." See Dependabot alerts를 click해서 들어가보았더니 패키지 버전에 문제가 있어 보이는것을 확인했다. 해결 방법 Insights -> dependencies의 문제가 된 package를 재설치 or upgrade한다. yarn upgrade ansi-regex yarn add ansi-regex 2022. 1. 18.
[TS 에러] Property 'map' does not exist on type ''.ts(2339) 문제 상황 Property 'map' does not exist on type ' '.ts(2339) 배열이 아닌 ' ' 를 map으로 돌리려고 했더니 나타난 타입 오류 해결 방법 배열 타입이 아니었던 arr의 타입을 제대로 정해서 map을 돌려야 한다. 해결 전 interface Aprops { name: string; arr: arrData; } // 중략 {arr.map((li: any) => { // } 해결 후 interface Aprops { name: string; arr: arrData[]; } // 중략 {arr.map((li: any) => { // } 2021. 10. 13.
[React test code 오류 ] Validation Error: Module /Users/{유저이름}/" "/" "/node_modules/jest-circus/runner.js in the testRunner option was not found. 문제 상황 Validation Error: Module /Users/{경로/경로/...}/style-test/node_modules/jest-circus/runner.js in the testRunner option was not found. is: /Users/1nk_0/{경로/경로...}: https://jestjs.io/docs/configuration.html local 환경에서 test 하던 것을 git 에 올려놓고 다른 local에서 repository를 clone 해와서 testcode를 돌리니 생긴 오류 해결 방법 검색해보니 다양한 원인이 이었지만, 나의 경우에는 package.json "testRunner": "/Users/1nk_0/{경로/경로...}/node_modules/jest-c.. 2021. 8. 16.
[React 에러] Warning: componentWillMount has been renamed, and is not recommended for use. Warning: componentWillMount has been renamed, and is not recommended for use. 문제 상황 React에서 오랜만에 Class 형태로 코드를 구현하는 중에 이러한 경고를 받았는데 해결 과정 componentWillMound --> componentDidMount로 변경함으로써 해결했다. 수정 전 componentWillMount() { fetchGet('data/productData.json') .then((res) => res.json()) .then((data) => { 수정 후 componentDidMount() { fetchGet('data/productData.json') .then((res) => res.json()) .then((dat.. 2021. 7. 30.
[Next.js] Warning : Props 'className' did not match Server: ' ' Client: ' ' 문제상황 Warning : Props 'className' did not match Server: ' ' Client: ' ' Next.js 로 styled-components로 스타일을 적용한뒤에 난 오류! 이 오류는 Server 의 클래스와 Client의 클래스가 달라서 match 가 안된다는 것. Next.js는 첫 화면은 SSR(서버사이드렌더링)을 한 후에 뒤에 부분적으로 CSR(클라이언트 사이드 렌더링)을 하게 되는데 이때 서버와 클라이언트의 클래스가 달라서 생기게 된 오류이다. 실제로 Element를 확인하면 class= 'login_LoginDiv-sc-v...."로 되어있는데 서버에서는 class= "sc-v,,...."로 되어 있어 매치가 되지 않는다. 해결 방법 바벨의 설정을 변경해주면.. 2021. 7. 23.
[React 경고 메세지] Assign arrow function to a variable before exporting as module default import/no-anonymous-default-export React프로젝트 진행 중 svg를 jsx 파일로 만들어 사용했는데, svg 파일을 exprot 할 때 잘못내보내었다는 경고 메세지가 나왔다. 콘솔 창에 "모듈 기본 import/no-anonymous-default-export로 내보내기 전에 변수에 개체를 할당합니다" 라는 오류가 있다. 변경 전 export default () => ( ); 변경 후 const SearchButtonSvg = () => ( ); export default SearchButtonSvg; 변수에 먼저 할당하고 export해준다. 참고링크 https://dev.to/tmenyhart/comment/195kp 2021. 5. 21.
iterm 팝업 " a control sequence attempted to clear scrollback history" 뜻 vscode 말고 iterm 에서 react 프로젝트를 npm start 했더니 이런 팝업 메세지가 떴다. 예전 같았으면 아무거나 눌렀었는데, 당시 오류로 머리가 아픈 상황이라 아무거나 누르기 두려워 서치한 결과 " a control sequence attempted to clear scrollback history" 원래 vim에서 과거 3-4 가지 동작들을 볼 수 있게 default 설정되어 있는데, 이 hitory를 항상 지우려 한다. 허용할것인가거부할것인가 ? 이뜻이었다. Accept 하고 넘겼다.! 참고링크 :gitlab.com/gnachman/iterm2/-/issues/9275 Unexplained, new "control sequence" message when exiting Vim whi.. 2021. 5. 11.
반응형