본문 바로가기

git

Error: Your application tried to access @eslint/eslintrc, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound.

yarn > pnpm으로 바꾸게 되면서 pnpm에서 ESLint까지 적용을 했다.

1) brew install pnpm 

2) pnpm install 

3) pnpm run lint를 했는데 아래와 같은 에러가 계속 발생하였다.

 

Oops! Something went wrong! :(

ESLint: 8.55.0 Error: Your application tried to access @eslint/eslintrc, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound.

 

Required package: @eslint/eslintrc ~ 

 

package.json과 pnpm list로 여러 lint 버전을 확인과 동시에 

pnpm install --save-dev eslint@8.45.0 와 같이 필요한 특정 버전을 설치하기도 했는데 위와 같은 에러가 계속 발생하고 있었다. 

 

알고보니, 현재 내 브랜치의 위치가 내가 만든 feature 브랜치에 위치해있었는데 

develop 브랜치를 git pull origin develop을 해줌으로써 내가 만든 feature 브랜치와 develop 브랜치와 병합을 해줬는데, develop 브랜치를 pull 해옴으로써 의존성 문제를 해결할 수 있었다. 

 

 

이런식으로 lint와 관련된 에러가 출력되었는데 lint 관련 에러는 자동으로 fix가 되지 않아 저 경고가 계속 날 것이고, formatter 에러는 자동으로 fix가 된다. 

 

환경설정이 정말 코딩의 반인 것 같다~