본문 바로가기

오류처리

(22)
TypeError: 'x' is not iterable https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Errors/is_not_iterable TypeError: 'x' is not iterable - JavaScript | MDN TypeError developer.mozilla.org typeof 로 해당 콘솔 출력 결과 object라고 떠서 해결방법을 찾아보니 (filter로 돌리고 있었음, 위와 같은 에러 나옴) map 으로 구현해보라는 mozilla의 조언이다
Can't resolve '@material-ui/core/Stack',Can't resolve '@material-ui/lab material-ui 에서 datepicker를 제공하길래 한번 사용해보려고 했는데 위와 같은 오류가 뜨고 자세한 설명도 없고 ㅠㅠ 겨우겨우 찾아봐도 material-ui/core를 새 버전으로 깔라는 막연한 방법밖에 없었다. 스택오버플로우에서 찾다찾다가 겨우 찾아낸 방법 !! 하단 dependencies를 추가로 깔아줘야한다. 그냥 긁어서 붙이고 npm i 하자 ! https://next.material-ui.com/components/date-picker/ //package.json { "dependencies": { "@emotion/react": "11.1.5", "@emotion/styled": "11.1.5", "@material-ui/core": "5.0.0-alpha.24", } }
TypeError: Cannot read property 'map' of null 꽤나 자주 있는 오류인데, react는 화면에 커밋 된 후에야 모든 효과를 실행하기 때문에 map을 반복실행할때 첫 턴에서 데이터가 아직 안 들어와 렌더링이 실행되면서 그 데이터가 undefined로 나타나는 오류이다 문제 해결은 조건이 참이면 요소가 출력 될 수 있도록 &&를 추가한다. | 46 | > 47 | | ^ 48 | {realdata.map((list) => ( 49 | 47 | | ^ 48 | {realdata && realdata.map((list) => ( 49 |
[swagger오류]Error Initializing middleware 이 오류 발생시 노드 모듈 0 버전과 12 버전 차이때문에 발생하는 것임으로 node_modules/bagpipes/lib/fittingTypes/user.js 에서 var split = err.message.split(path.sep); 부분을 var split = err.message.split('\n')[0].split(path.sep); 로 변경 해주면 해결 가능하다 !
this is probably not a problem with npm.there is likely additional logging output above. node module missing 어쩌고 git clone 하여 가져온 주소를 npm start했을때 다음과 같은 오류가 뜬다면, node module폴더가 있는지 확인한후 package.lock.json을 삭제하고 npm i 로 다시 노드모듈을 깔아주면 정상적으로 작동한다 !
×Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in, or you might have mixed up default an.. × Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports. Check the render method of `App`. react 열심히 만들다가 다음과 같은오류가 나면 보통 세가지정도 보편적인이유이다 1.해당 컴퍼넌트내에 링크 잘못연결 2.해당 컴퍼넌트내에 대소문자 오류 3.app.js..