当我将下一个 js 站点部署到 vercel 时遇到此构建错误
15:02:38 > Build error occurred
15:02:38 Error: Export encountered errors on following paths:
15:02:38 /about/undefined
15:02:38 at exportApp (/vercel/workpath0/node_modules/next/dist/export/index.js:30:1103)
15:02:38 at processTicksAndRejections (internal/process/task_queues.js:97:5)
15:02:38 at async /vercel/workpath0/node_modules/next/dist/build/index.js:39:69
15:02:38 at async /vercel/workpath0/node_modules/next/dist/build/tracer.js:1:525
Run Code Online (Sandbox Code Playgroud)
我的网站没有称为 about 的页面,所以我真的不知道这个错误指的是什么。我尽可能多地检查以找到可靠的答案,但不能。任何帮助表示赞赏!
我有一个盖茨比应用程序,我在其中渲染富文本内容。一切都运行良好,除了我无法获取我在内容丰富的 CMS 中超链接的文本。当前代码如下所示,我可以获取 url 或 uri(在内容丰富的情况下),但不能获取我超链接的值/文本。有人可以帮忙吗?
import React from 'react';
import { graphql, Link } from 'gatsby';
import Img from 'gatsby-image';
import { renderRichText } from 'gatsby-source-contentful/rich-text';
import { BLOCKS, MARKS, INLINES } from '@contentful/rich-text-types';
const Bold = ({ children }) => <span className="bold">{children}</span>;
const Text = ({ children }) => <p className="align-center">{children}</p>;
const website_url = 'https://stackoverflow.com';
// Setting the rendering options. Same as:
// https://github.com/contentful/rich-text/tree/master/packages/rich-text-react-renderer
const options = {
renderMark: {
[MARKS.BOLD]: (text) => <Bold>{text}</Bold>
},
renderNode: {
[INLINES.HYPERLINK]: …Run Code Online (Sandbox Code Playgroud)