Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- asynchronization
- 배열추가
- react #회원가입 #비밀번호비교
- 값삭제
- useState
- await
- barplot
- 10172
- 이스케이프시퀀스
- React
- R데이터형태
- 백준
- 값추가
- getline
- 버스분석
- DataFrame
- 백준 11718
- R 그래프
- 광명시버스분석
- vetor
- 이용현황분석
- 배열삭제
- 그래픽
- 데이터분석
- barplot in r
- setstate
- 그대로 출력하기
- 탈출문자
- plot in r
- 백준 10172
Archives
- Today
- Total
devlog_zz
[오류 해결] Jest Could not locate module FileName.css (mapped as identity-obj-proxy) 본문
Front End/React
[오류 해결] Jest Could not locate module FileName.css (mapped as identity-obj-proxy)
YJ_SW 2022. 12. 11. 19:20728x90
Next.js기반 프로젝트에 Jest Unit test 환경 구성 후 test 파일 실행 시 오류가 발생했다.
Jest Could not locate module FileName.css (mapped as identity-obj-proxy)
FAIL __tests__/index.test.jsx
● Test suite failed to run
Configuration error:
Could not locate module ../styles/Home.module.css mapped as:
identity-obj-proxy.
Please check your configuration for these entries:
{
"moduleNameMapper": {
"/^.+\\.module\\.(css|sass|scss)$/": "identity-obj-proxy"
},
"resolver": undefined
}
1 | import Head from 'next/head'
2 | import Image from 'next/image'
> 3 | import styles from '../styles/Home.module.css'
| ^
해결방법
devDependencies에 identity-obj-proxy가 있는지 확인하고 없다면 아래 명령어 실행
package.json 확인
"devDependencies": {
...
"identity-obj-proxy": "^3.0.0",
}
npm install --save-dev identity-obj-proxy
728x90
'Front End > React' 카테고리의 다른 글
세자리(천단위)마다 콤마 toLocaleString() / 사용시 number Type setState 오류 / 숫자만 남기는 함수 (0) | 2023.02.03 |
---|---|
typescript 변수를 통한 객체 속성 접근 (0) | 2023.01.26 |
이전 state에 의존하는 state update 시 주의점 (0) | 2022.11.28 |
이벤트핸들러함수 onChange = {handleChange}, onChange = {e => handleChange(e)} (0) | 2022.11.28 |
vite proxy 설정하기 (0) | 2022.11.09 |