yarn node 버전 호환 안됨 이슈

나의 재물운? 연애운은?

AI가 봐주는 내 사주팔자 - 운세박사

https://aifortunedoctor.com/

yarn node 버전 호환 안됨 이슈

영리치 0 1,959 2022.11.06 17:18

error nextjs-with-typescript@0.1.0: The engine "node" is incompatible with this module. Expected version ">= 16.0.0". Got "14.17.0"

error nextjs-with-typescript@0.1.0: The engine "yarn" is incompatible with this module. Expected version ">= 1.22.17". Got "1.22.10"

회사 보일러플레이트가 업그레이드 됬는데 새로 받다보니 내 맥북에 깔려진 노드와 Yarn 버전보다 상위버전을 쓰는 듯함

노드와 Yarn을 업데이트 시켜줘야함


여기서 빡치는 게 내가 맥북에 Node와 Yarn을 Homebrew로 설치했는지 뭔지 모르겠음

Warning: You have unlinked kegs in your Cellar.

Leaving kegs unlinked can lead to build-trouble and cause formulae that depend on

those kegs to fail to run properly once built. Run `brew link` on these:

  yarn

  python@3.10

  node

  python@3.9


Homebrew랑 연동안되어 있는 거 보니까 homebrew로 업데이트 하면 안될 듯


node -v 로 버전 확인


Node 버전 업그레이드는 아래 글 보고 참고함

노드는 아래와 같이 업그레이드 했고

https://www.bottlehs.com/etc/mac-%EC%97%90%EC%84%9C-node-js-npm-%EC%97%85%EB%8D%B0%EC%9D%B4%ED%8A%B8-%ED%95%98%EA%B8%B0-2021/


yarn이 문제인데 homebrew 에서 아래와 같이 에러를 뱉음

brew upgrade yarn

Warning: yarn 1.22.19 already installed

yarn --version           

1.22.10

홈브류에서는 yarn이 이미 최신으로 설치되어 있다고 하고

yarn --version쳐보면 1.22.10으로 나옴

이거 맥북 자체에서 yarn 버전이랑 프로젝트 yarn 버전이랑 다른건지 뭔지 모르겠음

그래서 그냥 아래 링크 보고 따라함


https://yarnpkg.com/cli/set/version

yarn set version latest

위에 명령어 치니까 잘 됨


결론적으로 yarn이랑 node랑 둘 다 업데이트 해주니까 잘됨

프론트개발 개싫다 왜케 업데이트가 잦음? 1~2년 새에 노드 버전이 대체 몇이 오른거임?

아 진짜 개싫다



프론트엔드는 버전이 너무 계속 바뀌어서 이거 대응하다가는 늙어서 뒤지겠다

걍 프론트엔드 버전이 올라가든 말든 나는 하나 정해서 더 이상 대응하지 않고 거기서 키우는 게 맞을 것 같다

이게 대응하기 시작하면 끝도없고 평생 공부만 하다가 의미 없이 가난하게 살 듯

프론트엔드 버전 고정하고 걍 백엔드나 파는 게 맞을 듯


다시 회사 1차 보일러플레이트로 돌아와서

git push origin +main 코드 실행 시,

error: src refspec main does not match any


풀 해야할 것 같아서 풀을 땡기면

git pull origin main

마스터 브랜치는 보일러플레이트 히스토리고

main 브랜치는 내 레포지토리 히스토리임

fatal: refusing to merge unrelated histories


아래와 같이 해결

git pull origin master --allow-unrelated-histories


아 위에 걍 무시하고

로컬에서 git branch main 하고

git checkout main

git push origin main 하니까 해결됨


Node 버전 업데이트 하고 이전 버전 보일러플레이트 실행하니까 또 안됨

ready - started server on 0.0.0.0:3000, url: http://localhost:3000

warn  - React 17.0.1 or newer will be required to leverage all of the upcoming features in Next.js 11. Read more: https://nextjs.org/docs/messages/react-version

info  - Using webpack 5. Reason: no custom webpack configuration in next.config.js https://nextjs.org/docs/messages/webpack5

Error: error:0308010C:digital envelope routines::unsupported

    at new Hash (node:internal/crypto/hash:71:19)

    at Object.createHash (node:crypto:133:10)

    at BulkUpdateDecorator.hashFactory (/Users/jaehoonlim/Desktop/dev/authenticationTest-next/node_modules/next/dist/compiled/webpack/bundle5.js:133790:18)

    at BulkUpdateDecorator.update (/Users/jaehoonlim/Desktop/dev/authenticationTest-next/node_modules/next/dist/compiled/webpack/bundle5.js:133692:50)

    at OriginalSource.updateHash (/Users/jaehoonlim/Desktop/dev/authenticationTest-next/node_modules/next/dist/compiled/webpack-sources2/index.js:1:19148)

    at NormalModule._initBuildHash (/Users/jaehoonlim/Desktop/dev/authenticationTest-next/node_modules/next/dist/compiled/webpack/bundle5.js:65772:17)

    at handleParseResult (/Users/jaehoonlim/Desktop/dev/authenticationTest-next/node_modules/next/dist/compiled/webpack/bundle5.js:65837:10)

    at /Users/jaehoonlim/Desktop/dev/authenticationTest-next/node_modules/next/dist/compiled/webpack/bundle5.js:65928:4

    at processResult (/Users/jaehoonlim/Desktop/dev/authenticationTest-next/node_modules/next/dist/compiled/webpack/bundle5.js:65651:11)

    at /Users/jaehoonlim/Desktop/dev/authenticationTest-next/node_modules/next/dist/compiled/webpack/bundle5.js:65711:5

Error: error:0308010C:digital envelope routines::unsupported

    at new Hash (node:internal/crypto/hash:71:19)

    at Object.createHash (node:crypto:133:10)

    at BulkUpdateDecorator.hashFactory (/Users/jaehoonlim/Desktop/dev/authenticationTest-next/node_modules/next/dist/compiled/webpack/bundle5.js:133790:18)

    at BulkUpdateDecorator.update (/Users/jaehoonlim/Desktop/dev/authenticationTest-next/node_modules/next/dist/compiled/webpack/bundle5.js:133692:50)

    at OriginalSource.updateHash (/Users/jaehoonlim/Desktop/dev/authenticationTest-next/node_modules/next/dist/compiled/webpack-sources2/index.js:1:19148)

    at NormalModule._initBuildHash (/Users/jaehoonlim/Desktop/dev/authenticationTest-next/node_modules/next/dist/compiled/webpack/bundle5.js:65772:17)

    at handleParseResult (/Users/jaehoonlim/Desktop/dev/authenticationTest-next/node_modules/next/dist/compiled/webpack/bundle5.js:65837:10)

    at /Users/jaehoonlim/Desktop/dev/authenticationTest-next/node_modules/next/dist/compiled/webpack/bundle5.js:65928:4

    at processResult (/Users/jaehoonlim/Desktop/dev/authenticationTest-next/node_modules/next/dist/compiled/webpack/bundle5.js:65651:11)

    at /Users/jaehoonlim/Desktop/dev/authenticationTest-next/node_modules/next/dist/compiled/webpack/bundle5.js:65711:5

node:internal/crypto/hash:71

  this[kHandle] = new _Hash(algorithm, xofLen);



대형 걍 노드 버전 롤백함

sudo n 14 


와 프론트 개빡친다

이거 뭐 경력도 안되고 이딴 거 뭐임? ㅋㅋㅋㅋ

와 진짜 미쳤다 프론트 ㅋㅋㅋ

이거에만 한 3시간은 쓴 듯

Comments

나의 재물운? 연애운은?

AI가 봐주는 내 사주팔자 - 운세박사

https://aifortunedoctor.com/

Category
Magazine
훈남/훈녀
 
 
 
상점
Facebook Twitter GooglePlus KakaoStory NaverBand