TL;DR

  1. 모노레포로 구성된 레포지토리를 Vercel에 Import

  2. 빌드 커맨드 수정

    Untitled

  3. 루트 디렉토리 수정

    Untitled


각종 트러블 해결과정

  1. 빌드 에러

    모노레포는 packages 폴더에 패키지가 들어있으므로, 빌드 명령어를 수정해야 한다.

    → 각 레포지토리에 해당하는 빌드 명령어로 수정한다.

    Untitled

    → Root Directory도 최상단으로 수정한다.

    Untitled

  2. Output 에러

    Untitled

    Error: No Output Directory named "public" found after the Build completed. You can configure the Output Directory in your Project Settings.


    Learn More: https://vercel.link/missing-public-directory

    → Output Directory를 NextJS의 public폴더가 있는 위치로 수정한다.

    Untitled

  3. Not Found 에러

    Untitled

    → Framework를 지정 안해서 그런 듯??

    Framework를 NextJS로만 설정하면 또 에러 뜸

    ⇒ 그래서 수정의 수정

    1. Framework 지정, build command 수정

    Untitled

    1. Root Directory 수정

    Untitled

    → 굿!