오랜만에 신규 프로젝트를 생성했는데 아래와같은 오류가 떴다..
O는 성공한 방법
X는 시도했지만 실패한 방법 ( 다른사람은 될 수도 있음 )
[eslint] Failed to load plugin 'jsx-a11y' declared in 'package.json » eslint-config-react-app': Cannot find module 'deep-equal'
모르는 건 냅다 구글검색.
❌npm 공식 홈페이지
https://www.npmjs.com/package/deep-equal
npm install deep-equal
위 링크에서 나온대로 입력해 주었더니 오류가 해결된 듯 했으나 페이지를 새로고침하니 오류가 다시 생겼다
❌ 노드 및 NPM 업데이트하기
In my case, we have a React app created with Create React App (CRA) back in 2019. CRA automatically gave us ESLint enabled by default, and lint was ran as part of 'react-scripts build'. Our code for this app hasn't changed since early 2020.
Now something has changed somewhere, and ESLint gave us this "unexpected token" regarding 'jsx-a11y'. 'React-scripts build' failed with our build server having Node 10.x version.
Updating Node is one solution, as mentioned by previous answer. But in our case build server is using Node 10.6, managed by other team. I cannot update Node there. I needed to get past this issue while still using Node 10.6.
My quick solution was to disable the CRA-provided ESLint so it's not executed as part of build, and to add ESLint manually so I can run it on-demand within my dev environment. (I also actually downgraded Node on my laptop to match Node version 10.6. used by build server, so I'll catch these more easily in the future.)
검색하던중 노드 업데이트를 안한지 꽤 됐다는게 생각이 났다.
npm install node
노드 업데이트를 했으나 또 같은오류 발생
🟢node 새로설치
위의 두가지 방법을 해도 안돼서 마지막 방법으로 시도한 node 재설치.. 허무하게 바로 해결되었다.
'React > error' 카테고리의 다른 글
[React] 네이버 영화 API 오류, SE05 (0) | 2023.06.15 |
---|---|
[React error] authInternal._getRecaptchaConfig is not a function (0) | 2023.05.16 |
[React] React-router-dom 설치 import 안됨. (0) | 2023.02.09 |