강의

멘토링

커뮤니티

인프런 커뮤니티 질문&답변

김태령님의 프로필 이미지
김태령

작성한 질문수

OpenAI를 활용한 나만의 AI 에이전트 만들기 (Agent Builder, GPT-5, Chatkit, Cloudflare, MCP, Fine Tuning, CoT 등)

Cloudflare로 앱 배포하기

22강 빌드할때 에러가 뜨고 있습니다.

해결된 질문

작성

·

27

0

2026-01-24T18:01:27.860119Z Cloning repository...

2026-01-24T18:01:28.415748Z From https://github.com/ssmktr/openai-chatkit-starter-app

2026-01-24T18:01:28.416363Z * branch d8abdc1e7810bbe5fdb3c809e65c2b07141d1450 -> FETCH_HEAD

2026-01-24T18:01:28.41648Z

2026-01-24T18:01:28.451163Z HEAD is now at d8abdc1 Simplify ChatKit backend (#104)

2026-01-24T18:01:28.451626Z

2026-01-24T18:01:28.523349Z

2026-01-24T18:01:28.523863Z Using v2 root directory strategy

2026-01-24T18:01:28.544435Z Success: Finished cloning repository files

2026-01-24T18:01:30.338662Z Checking for configuration in a Wrangler configuration file (BETA)

2026-01-24T18:01:30.339458Z

2026-01-24T18:01:31.455516Z No wrangler.toml file found. Continuing.

2026-01-24T18:01:31.532601Z Detected the following tools from environment: nodejs@22.21.1

2026-01-24T18:01:31.533343Z Installing nodejs 22.21.1

2026-01-24T18:01:32.491348Z Trying to update node-build... ok

2026-01-24T18:01:32.581604Z To follow progress, use 'tail -f /tmp/node-build.20260124180132.491.log' or pass --verbose

2026-01-24T18:01:32.676902Z Downloading node-v22.21.1-linux-x64.tar.gz...

2026-01-24T18:01:32.916706Z -> https://nodejs.org/dist/v22.21.1/node-v22.21.1-linux-x64.tar.gz

2026-01-24T18:01:35.061658Z

2026-01-24T18:01:35.061984Z WARNING: node-v22.21.1-linux-x64 is in LTS Maintenance mode and nearing its end of life.

2026-01-24T18:01:35.062214Z It only receives critical security updates, critical bug fixes and documentation updates.

2026-01-24T18:01:35.0625Z

2026-01-24T18:01:35.062624Z Installing node-v22.21.1-linux-x64...

2026-01-24T18:01:35.494128Z Installed node-v22.21.1-linux-x64 to /opt/buildhome/.asdf/installs/nodejs/22.21.1

2026-01-24T18:01:35.49449Z

2026-01-24T18:01:36.434863Z Executing user command: npx @cloudflare/next-on-pages@1

2026-01-24T18:01:37.460162Z npm warn exec The following package was not found and will be installed: @cloudflare/next-on-pages@1.13.16

2026-01-24T18:01:49.78096Z npm warn deprecated path-match@1.2.4: This package is archived and no longer maintained. For support, visit https://github.com/expressjs/express/discussions

2026-01-24T18:01:50.799789Z npm warn deprecated tar@6.2.1: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exhorbitant rates) by contacting i@izs.me

2026-01-24T18:01:51.18784Z npm warn deprecated @cloudflare/next-on-pages@1.13.16: Please use the OpenNext adapter instead: https://opennext.js.org/cloudflare

2026-01-24T18:01:59.323249Z ️ @cloudflare/next-on-pages CLI v.1.13.16

2026-01-24T18:01:59.510375Z ️ Detected Package Manager: npm (10.9.4)

2026-01-24T18:01:59.510832Z ️ Preparing project...

2026-01-24T18:01:59.513738Z ️ Project is ready

2026-01-24T18:01:59.514039Z ️ Building project...

2026-01-24T18:02:00.366087Z ▲ npm warn exec The following package was not found and will be installed: vercel@50.5.0

2026-01-24T18:02:05.898447Z ▲ npm warn deprecated tar@6.2.1: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exhorbitant rates) by contacting i@izs.me

2026-01-24T18:02:08.620603Z ▲ Vercel CLI 50.5.0

2026-01-24T18:02:08.625834Z ▲ > NOTE: The Vercel CLI now collects telemetry regarding usage of the CLI.

2026-01-24T18:02:08.626058Z ▲ > This information is used to shape the CLI roadmap and prioritize features.

2026-01-24T18:02:08.626552Z ▲ > You can learn more, including how to opt-out if you'd not like to participate in this program, by visiting the following URL:

2026-01-24T18:02:08.626709Z ▲ > https://vercel.com/docs/cli/about-telemetry

2026-01-24T18:02:08.713183Z ▲ WARN! Build not running on Vercel. System environment variables will not be available.

2026-01-24T18:02:08.844345Z ▲ Your application is being built using next build. If you need to define a different build step, please create a vercel-build script in your package.json (e.g. { "scripts": { "vercel-build": "npm run prepare && next build" } }).

2026-01-24T18:02:08.847668Z ▲ Installing dependencies...

2026-01-24T18:02:09.443264Z ▲ up to date in 464ms

2026-01-24T18:02:09.460617Z ▲ Warning: Could not identify Next.js version, ensure it is defined as a project dependency.

2026-01-24T18:02:09.481655Z ▲ Error: No Next.js version detected. Make sure your package.json has "next" in either "dependencies" or "devDependencies". Also check your Root Directory setting matches the directory of your package.json file.

2026-01-24T18:02:09.554599Z

2026-01-24T18:02:09.554859Z ️ The Vercel build npx vercel build) command failed. For more details see the Vercel logs above.

2026-01-24T18:02:09.554978Z ️ If you need help solving the issue, refer to the Vercel or Next.js documentation or their repositories.

2026-01-24T18:02:09.555101Z

2026-01-24T18:02:09.599906Z Failed: Error while executing user command. Exited with error code: 1

2026-01-24T18:02:09.609667Z Failed: build command exited with code: 1

2026-01-24T18:02:11.150853Z Failed: error occurred while running build command

 

빌드시 위에처럼 에러가 뜨면서 응용 프로그램 빌드 중 에서 멈추고 있습니다.

해결방법이 어떻게 될까요?

답변 2

1

AI CASTLE님의 프로필 이미지
AI CASTLE
지식공유자

안녕하세요!

문의 주신 빌드 에러 확인했습니다.

원인: 최근 OpenAI에서 chatkit-starter-app 레포지토리 구조를 변경했습니다. 기존 Next.js 기반에서 Vite + Python 백엔드 구조로 바뀌면서 발생한 빌드 에러입니다.

해결 방법: 아래 순서대로 진행해 주세요.

 

1. 기존 Fork한 레포지토리 삭제

1. GitHub에서 본인이 Fork한 openai-chatkit-starter-app 레포지토리로 이동

2. Settings (설정) 클릭

3. 맨 아래로 스크롤하여 Danger Zone 섹션 찾기

4. Delete this repository 클릭

5. 레포지토리 이름 입력 후 삭제 확인

 

2. 새 레포지토리 Fork

- 아래 링크에서 새로 Fork 해주세요:

- https://github.com/aicastle-school/openai-chatkit-starter-app

 

3. Cloudflare 재설정

- Cloudflare Pages에서 기존 프로젝트 삭제 후, 새로 Fork한 레포지토리로 다시 배포해 주세요.

- 강의 내용 그대로 진행하시면 됩니다.


강의 자료도 새 레포지토리 주소로 업데이트 완료했습니다. 😊

0

안녕하세요, 인프런 AI 인턴입니다. 김태령님.

문제를 해결하기 위해 몇 가지 유용한 조언을 드리겠습니다. 특히, 앱 빌드 시 에러가 나타나는 상황인 점을 고려할 때, 다음 사항을 확인해 볼 수 있습니다.

  1. Next.js 의존성 확인:

    • 에러 로그에서 “No Next.js version detected”라는 메시지가 보입니다. 이는 package.json 파일에 Next.js가 포함되어 있지 않음을 의미합니다.
    • package.json 파일을 열어 “dependencies” 또는 “devDependencies” 항목에 "next": "..."가 있는지 확인하고 없다면 추가하세요. 예시로 "next": "^12.0.0" 같은 버전 정보를 포함시킬 수 있습니다.
  2. node_modules 삭제 및 재설치:

    • 프로젝트 루트에서 node_modules 폴더와 package-lock.json 파일을 삭제한 후 npm install을 사용하여 모든 패키지를 다시 설치해 보세요.
    • 이는 패키지 간의 의존성 충돌이나 누락 문제를 해결하는 데 도움을 줄 수 있습니다.
  3. 빌드 스크립트 수정:

    • 에러 로그에서 vercel-build 스크립트 사용이 언급되었습니다. package.json의 “scripts” 항목에 "vercel-build": "npm run build" 같은 빌드 스크립트를 추가하여 정확한 빌드 프로세스를 정의해 주세요.
  4. OpenNext Adapter 사용 권장:

    • 로그를 통해 @cloudflare/next-on-pages의 대체로 OpenNext를 권장하고 있습니다. OpenNext 문서를 참조하여 프로젝트에 추가하는 것을 고려해 보세요. 이는 최신 기능들과의 호환성을 높이는 데 도움이 될 것입니다.
  5. Vercel 문서와 Next.js 문서 참조:

    • 프로젝트가 Vercel 기반 빌드를 사용 중이라면, Vercel 문서를 참조하여 환경설정이 올바르게 이루어졌는지 확인하세요.
    • 또한, Next.js 문서를 검토하여 올바르게 설정되었는지 확인하는 것도 중요합니다.

이러한 방법들을 통해 문제 해결에 도움이 되길 바랍니다. 필요한 경우, 추가적인 정보나 조치 방법을 제공해드리겠습니다.

저는 질문자님의 이해를 돕고자 지식공유자님의 기존 답변을 참고하여 유사한 답변 링크를 추천해드리고 있습니다.
현재 베타 기능으로 답변이 만족스럽지 않을 수 있는 점 양해 부탁드립니다. 🙏
추가적으로 궁금한 점이 있으시면, 이어서 질문해 주세요. 곧 지식공유자께서 답변해 주실 것입니다.

김태령님의 프로필 이미지
김태령

작성한 질문수

질문하기