尝试将 Nextjs 部署到 Vercel 时出错

时间:2021-07-10 18:25:27

标签: next.js vercel

我一直在尝试将我的 next.js 应用程序部署到 vercel,但一直收到以下错误。一切都在本地工作,甚至构建没有错误。不确定在哪里查找错误位置?我知道 api 密钥是正确的,所以不知道去哪里寻找问题。

<div style="background-image: url('/foo.svg');
    width: 100%;
    height: 60px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;"></div>

如果需要,这里还有我的 package.json:

13:51:22.627    info  - Creating an optimized production build...
13:52:12.318    info  - Compiled successfully
13:52:12.319    info  - Collecting page data...
13:52:12.653    (node:459) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
13:52:12.653    (node:459) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
13:52:12.653    > Build error occurred
13:52:12.655    [Error: Your API key is invalid, please check you have copied it correctly.] {
13:52:12.656      type: 't',
13:52:12.656      code: 'auth/invalid-api-key',
13:52:12.656      a: null
13:52:12.656    }
13:52:12.710    error Command failed with exit code 1.
13:52:12.710    info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
13:52:12.729    Error: Command "yarn run build" exited with 1

0 个答案:

没有答案