将 NextJS 应用程序部署到 GCP 时出现预渲染错误

时间:2021-03-08 23:15:30

标签: reactjs google-app-engine google-cloud-platform firebase-authentication next.js

尝试使用 react-firebase-ui(在索引页面上)将 NextJS 应用部署到 GCP。显示以下消息后部署失败。该应用程序在本地使用 docker 运行良好。

Step #0: info  - Generating static pages (2/5)
Step #0: 
Step #0: Error occurred prerendering page "/". Read more: https://err.sh/next.js/prerender-error
Step #0: undefined
Step #0: info  - Generating static pages (3/5)
Step #0: { isEmailVerified: false }
Step #0: { user: null }
Step #0: info  - Generating static pages (5/5)
Step #0: 
Step #0: > Build error occurred
Step #0: Error: Export encountered errors on following paths:
Step #0:    /
Step #0:     at /app/node_modules/next/dist/export/index.js:30:1103
Step #0:     at async /app/node_modules/next/dist/build/tracer.js:1:1441
Step #0:     at async /app/node_modules/next/dist/build/index.js:39:69
Step #0:     at async /app/node_modules/next/dist/build/tracer.js:1:1441
Step #0:     at async /app/node_modules/next/dist/build/index.js:21:731
Step #0:     at async /app/node_modules/next/dist/build/tracer.js:1:1441
Step #0: npm ERR! code ELIFECYCLE
Step #0: npm ERR! errno 1

0 个答案:

没有答案