목록2022/07/01 (2)
Hey Tech
[React] 에러 해결: "Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it."
❗️에러 상황 return에서 아래와 같이 코드 작성 후 실행 시 에러 발생 return ( {function} ) 📝에러 메시지 Functions are not valid as a React child. This may happen if you return a Component instead of from render. Or maybe you meant to call this function rather than return it. ✅해결책 다음과 같이 함수명 뒤에 괄호 붙여주면 해결됩니다. return ( {function()} ) 포스팅 내용에 오류가 있다면 아래에 댓글 남겨주세요. 그럼 오늘도 즐거운 하루 보내시길 바랍니다 :) 고맙습니다😊
SW 개발/React JS
2022. 7. 1. 18:05
[JavaScript] npm 모듈 재설치 방법(feat. 모듈 삭제 방법)
Step 1. 디렉토리 접근 터미널을 통해 package-lock.json과 node_modules 폴더가 위치한 디렉토리로 이동합니다. Step 2. package-lock.json 삭제 rm -rf package-lock.json Step 3. node_modules 삭제 rm -rf node_modules Step 4. npm 모듈 재설치 npm install 포스팅 내용에 오류가 있다면 아래에 댓글 남겨주세요. 그럼 오늘도 즐거운 하루 보내시길 바랍니다 :) 고맙습니다😊
SW 개발/Vanilla JS
2022. 7. 1. 01:10