首页 > 解决方案 > Vercel 上的部署过程 - 与 CMS 相关的错误

问题描述

这是我第一次部署应用程序,我选择使用 Vercel 进行部署。这是一个 NextJS 应用程序,它使用 Prismic CMS 来获取数据。出于某种原因,在部署过程中,我收到与 cms 相关的错误。错误是:

18:37:44.594    > Build error occurred
18:37:44.595    Error: Unexpected status code [404] on URL https://undefined.prismic.io/api/v2
18:37:44.595        at /vercel/f2f729/node_modules/prismic-javascript/cjs/prismic-javascript.js:1093:25
18:37:44.595        at processTicksAndRejections (internal/process/task_queues.js:97:5) {
18:37:44.595      type: 'Error',
18:37:44.595      status: 404
18:37:44.595    }
18:37:44.620    error Command failed with exit code 1.
18:37:44.621    info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
18:37:44.632    Error: Command "yarn run build" exited with 1
18:37:46.595    Done with "package.json"

我想知道如何解决这个问题,如果你们能给我一些与这个过程相关的建议和最佳实践,我会很高兴的。

标签: reactjsdeploymentnext.jsvercel

解决方案


推荐阅读