반응형
참조페이지:
VS Code에서 ESLint 사용하기 - 1. 기본 설정
2018/05/29 - [이것저것 컴퓨터로 한 것들] - VS Code에서 ESLint 사용하기 - 2. ESLint 설정 취미(?) 및 공부 목적으로 VS Code(Visual Studio Code)를 통해 Javascript 공부를 하면서, ESLint를 사용해 볼 생각..
noooop.tistory.com
- Visual Studio Code eslint 확장설치
- yarn add -dev eslint 또는 npm --save-dev eslint 명령어로 eslint 패키지 설치 - 이건 안했음
- ctrl + shift + p로 명령팔레트 연 다음 create ESLINT Configuration 입력하여 eslint 초기설정
- 이걸 하니까 yes/no 선택하고 옵션 선택하는게 있었고 뭐든 선택하니 뭔가가 설치되었음
- 그리고 나서 yarn start 하니까 다음 에러 발생
There might be a problem with the project dependency tree.
It is likely not a bug in Create React App, but something you need to fix locally.
The react-scripts package provided by Create React App requires a dependency:
"eslint": "5.12.0"
Don't try to install it manually: your package manager does it automatically.
However, a different version of eslint was detected higher up in the tree:
/home/ibs/todo-list/node_modules/eslint (version: 5.16.0)
Manually installing incompatible versions is known to cause hard-to-debug issues.
If you would prefer to ignore this check, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That will permanently disable this message but you might encounter other issues.
To fix the dependency tree, try following the steps below in the exact order:
1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.
2. Delete node_modules in your project folder.
3. Remove "eslint" from dependencies and/or devDependencies in the package.json file in your project folder.
4. Run npm install or yarn, depending on the package manager you use.
In most cases, this should be enough to fix the problem.
If this has not helped, there are a few other things you can try:
5. If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead.
This may help because npm has known issues with package hoisting which may get resolved in future versions.
6. Check if /home/ibs/todo-list/node_modules/eslint is outside your project directory.
For example, you might have accidentally installed something in your home folder.
7. Try running npm ls eslint in your project folder.
This will tell you which other package (apart from the expected react-scripts) installed eslint.
If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That would permanently disable this preflight check in case you want to proceed anyway.
P.S. We know this message is long but please read the steps above :-) We hope you find them helpful!
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
반응형
'vs code' 카테고리의 다른 글
| vsCode Claude 사용자 메시지 색변경: 명령 팔레트Ctrl+Shift+P → Preferences: Open User Settings (JSON) → workbench.colorCustomizations/input.background추가 (0) | 2026.06.03 |
|---|---|
| [jsconfig.json] webpack쓸때 vsCode 자동완성(autoComplete) 적용 (0) | 2024.05.17 |
| [vscode] shorcut (0) | 2023.11.09 |
| [vsCode] java실행시 vmArgs 옵션추가방법 - launch.json에 추가 (0) | 2022.06.16 |
| [vs code] shortcut, tips... (0) | 2019.07.31 |
