小编Jeg*_*egs的帖子

由于“导出在以下路径上遇到错误”,下一个 JS 构建失败

当我将下一个 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 的页面,所以我真的不知道这个错误指的是什么。我尽可能多地检查以找到可靠的答案,但不能。任何帮助表示赞赏!

reactjs next.js vercel

6
推荐指数
5
解决办法
8157
查看次数

如何在内容丰富的富文本中呈现超链接?

我有一个盖茨比应用程序,我在其中渲染富文本内容。一切都运行良好,除了我无法获取我在内容丰富的 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)

reactjs contentful

5
推荐指数
1
解决办法
4465
查看次数

标签 统计

reactjs ×2

contentful ×1

next.js ×1

vercel ×1