1. node_modules 폴더랑 package_lock.json 삭제 후 npm install & npm start 다시 해봤지만 소용 없음..
2. 노드 버전 문젠가 싶어서 12로 낮췄지만 소용없음..
3. 그 와중에 nvm 말 안들어서 cmd 관리자권한 실행해서 깔았는데 node 버전까진 잘 되더니 vscode 터미널에서 npm install했더니 또 에러 뜨고 소용 없음..
35995 error code ELIFECYCLE
35996 error errno 1
35997 error core-js@3.26.0 postinstall: `node -e "try{require('./postinstall')}catch(e){}"`
35997 error Exit status 1
35998 error Failed at the core-js@3.26.0 postinstall script.
35998 error This is probably not a problem with npm. There is likely additional logging output above.
35999 verbose exit [ 1, true ]
4. 관리자 권한 cmd에서 동일하게 npm start 실행.
npm WARN notsup Unsupported engine for react-scripts@5.0.1: wanted: {"node":">=14.0.0"} (current: {"node":"12.18.4","npm":"6.14.6"})
npm WARN notsup Not compatible with your version of node/npm: react-scripts@5.0.1
npm WARN notsup Unsupported engine for eslint@8.26.0: wanted: {"node":"^12.22.0 || ^14.17.0 || >=16.0.0"} (current: {"node":"12.18.4","npm":"6.14.6"})
npm WARN notsup Not compatible with your version of node/npm: eslint@8.26.0
npm WARN notsup Unsupported engine for react-app-polyfill@3.0.0: wanted: {"node":">=14"} (current: {"node":"12.18.4","npm":"6.14.6"})
npm WARN notsup Not compatible with your version of node/npm: react-app-polyfill@3.0.0
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^2.3.2 (node_modules\react-scripts\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN @apideck/better-ajv-errors@0.3.6 requires a peer of ajv@>=8 but none is installed. You must install peer dependencies yourself.
npm WARN @react-native-community/eslint-config@3.1.0 requires a peer of eslint@>=8 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-react-app@7.0.1 requires a peer of eslint@^8.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-flowtype@8.0.3 requires a peer of eslint@^8.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-ft-flow@2.0.1 requires a peer of eslint@^8.1.0 but none is installed. You must install peer dependencies yourself.
added 9 packages from 7 contributors and audited 1373 packages in 20.896s
229 packages are looking for funding
run `npm fund` for details
found 2 high severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details
음.. 네.. 그렇다면 다시 node.js 16을 깔아줌.
그리고 다시 npm install. 아차 근데 node_modules 폴더 삭제를 깜빡했네.. 일단 결과물
Installation complete. If you want to use this version, type
nvm use 16.18.0
C:\VSCode\otterland>npm install
npm WARN @apideck/better-ajv-errors@0.3.6 requires a peer of ajv@>=8 but none is installed. You must install peer dependencies yourself.
npm WARN @react-native-community/eslint-config@3.1.0 requires a peer of eslint@>=8 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-react-app@7.0.1 requires a peer of eslint@^8.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-flowtype@8.0.3 requires a peer of eslint@^8.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-ft-flow@2.0.1 requires a peer of eslint@^8.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
audited 1373 packages in 7.108s
229 packages are looking for funding
run `npm fund` for details
found 2 high severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details
저 안 깔리는 애들은 대체 왜 그러는 걸까? 버전 문제일까? 근데 버전도 이제 16으로 맞춰줬잖아 ㅠㅠ 뭐가 더 불만인거야 이놈자식아
마지막이다 생각하고 다시 한 번 node_modules 폴더랑 package.lock.json 삭제 후 관리자권한 cmd창에서 npm install 실행
그런데 왜 노드 버전이 12로 내려가 있지? 분명 아까 16.18.0으로 깔아서 use 상태였는데...
무지성으로 node만 16으로 바꾸고 다시 npm install 실행.
뭐가 더 되긴 됐는데... 프리티어가 안 먹힌다.
eslint에서도 에러.. 다시 검색..
https://www.inflearn.com/questions/36296
https://seogeurim.tistory.com/15?category=981579
이제 npm start할 때 peer-dependencyt는 안 뜨고 eslint 오류도 잡았는데 프리티어가 안 먹힌다.
https://stackoverflow.com/questions/52586965/why-does-prettier-not-format-code-in-vs-code
마지막으로 다시 프리티어를 Formatted document 포맷터로 설정해주니까 된다!!!!! 관리자 권한 cmd를 종료하고 vscode 터미널에서 npm start를 날려줘도 된다 ㅠㅠ 프리티어도 먹히고 빨간줄도 없다.
이제야 프로젝트 세팅이 끝났다... 이제 하나씩 만들어보기 시작!
문제는 아무튼 관리자 권한이었던 것 같다. 그렇지만 내 PC 상태가 썩 좋지 않으므로 깨끗한 PC라면 잘 되었을거 같기도 하고.. 노트북을 당장 사고싶어지고 있었는데 시간을 좀 벌었다.
'Framework > React' 카테고리의 다른 글
Module '"react"' has no exported member 'useState' (0) | 2022.05.30 |
---|