pnpm 마이그레이션 하면서 겪은 에러

Eunbi Park·2024년 6월 11일
1
post-thumbnail
  1. pnpm this error happened while installing a direct dependency of

    rm pnpm-lock.yaml
    rm -rf node_modules
    rm -rf ~/Library/pnpm
    pnpm install
  2. crashes "add --global" with "ERROR Unable to find the global bin directory

pnpm setup
source ~/.zshrc
  1. react/jsx-runtime' 모듈 또는 해당 형식 선언을 찾을 수 없습니다.
    이건 yarn.lock 파일 안 지워서 생긴 문제..
rm yarn.lock
rm -rf node_modules
pnpm i
  1. Cannot find module / Could not find a declaration file
    npm과 yarn의 경우 의존성을 끌어올려 설치하는 방식 때문에 직접적으로 설치하지 않은 라이브러리를 참조할 수 있게 됩니다. (=유령 의존성)

이 경우 직접 설치하면 됩니다.

pnpm i ${라이브러리}

참고

profile
Front-end developer

0개의 댓글