Skip to content

Build error on Ghost 4.x #137

@huydhoang

Description

@huydhoang

I'm getting this as I upgraded to Ghost v4. Any ideas on where to start looking?

This problem seemingly stems from markdown parsing, so it couldn't build those new routes with code, pre and figure html tags.

00:33:33.034 | Error occurred prerendering page "/design". Read more: https://nextjs.org/docs/messages/prerender-error
-- | --
00:33:33.035 | TypeError: (0 , hast_util_to_string__WEBPACK_IMPORTED_MODULE_4__.default) is not a function
00:33:33.035 | at /vercel/path0/.next/server/chunks/393.js:232:144
00:33:33.035 | at overload (/vercel/path0/node_modules/unist-util-visit/index.js:27:12)
00:33:33.035 | at node (�[33melement<code>�[39m) (/vercel/path0/node_modules/unist-util-visit-parents/index.js:56:27)
00:33:33.035 | at node (�[33melement<pre>�[39m) (/vercel/path0/node_modules/unist-util-visit-parents/index.js:67:75)
00:33:33.035 | at node (�[33melement<figure>�[39m) (/vercel/path0/node_modules/unist-util-visit-parents/index.js:67:75)
00:33:33.035 | at node (�[33mroot�[39m) (/vercel/path0/node_modules/unist-util-visit-parents/index.js:67:75)
00:33:33.035 | at visitParents (/vercel/path0/node_modules/unist-util-visit-parents/index.js:29:26)
00:33:33.035 | at visit (/vercel/path0/node_modules/unist-util-visit/index.js:22:3)
00:33:33.036 | at normalizePost (/vercel/path0/.next/server/chunks/393.js:154:25)
00:33:34.204 |  
00:33:34.204 | Error occurred prerendering page "/welcome". Read more: https://nextjs.org/docs/messages/prerender-error
00:33:34.204 | TypeError: (0 , hast_util_to_string__WEBPACK_IMPORTED_MODULE_4__.default) is not a function
00:33:34.204 | at /vercel/path0/.next/server/chunks/393.js:232:144
00:33:34.204 | at overload (/vercel/path0/node_modules/unist-util-visit/index.js:27:12)
00:33:34.204 | at node (�[33melement<code>�[39m) (/vercel/path0/node_modules/unist-util-visit-parents/index.js:56:27)
00:33:34.205 | at node (�[33melement<pre>�[39m) (/vercel/path0/node_modules/unist-util-visit-parents/index.js:67:75)
00:33:34.205 | at node (�[33melement<figure>�[39m) (/vercel/path0/node_modules/unist-util-visit-parents/index.js:67:75)
00:33:34.205 | at node (�[33mroot�[39m) (/vercel/path0/node_modules/unist-util-visit-parents/index.js:67:75)
00:33:34.205 | at visitParents (/vercel/path0/node_modules/unist-util-visit-parents/index.js:29:26)
00:33:34.205 | at visit (/vercel/path0/node_modules/unist-util-visit/index.js:22:3)
00:33:34.206 | at syntaxHighlightWithPrismJS (/vercel/path0/.next/server/chunks/393.js:221:60)
00:33:34.206 | at normalizePost (/vercel/path0/.next/server/chunks/393.js:154:25)
00:33:34.206 | info - Generating static pages (9/19)
00:33:35.464 |  
00:33:35.465 | Error occurred prerendering page "/write". Read more: https://nextjs.org/docs/messages/prerender-error
00:33:35.465 | TypeError: (0 , hast_util_to_string__WEBPACK_IMPORTED_MODULE_4__.default) is not a function
00:33:35.465 | at /vercel/path0/.next/server/chunks/393.js:232:144
00:33:35.465 | at overload (/vercel/path0/node_modules/unist-util-visit/index.js:27:12)
00:33:35.465 | at node (�[33melement<code>�[39m) (/vercel/path0/node_modules/unist-util-visit-parents/index.js:56:27)
00:33:35.465 | at node (�[33melement<pre>�[39m) (/vercel/path0/node_modules/unist-util-visit-parents/index.js:67:75)
00:33:35.465 | at node (�[33melement<figure>�[39m) (/vercel/path0/node_modules/unist-util-visit-parents/index.js:67:75)
00:33:35.465 | at node (�[33mroot�[39m) (/vercel/path0/node_modules/unist-util-visit-parents/index.js:67:75)
00:33:35.465 | at visitParents (/vercel/path0/node_modules/unist-util-visit-parents/index.js:29:26)
00:33:35.466 | at visit (/vercel/path0/node_modules/unist-util-visit/index.js:22:3)
00:33:35.466 | at syntaxHighlightWithPrismJS (/vercel/path0/.next/server/chunks/393.js:221:60)
00:33:35.466 | at normalizePost (/vercel/path0/.next/server/chunks/393.js:154:25)
00:33:37.685 | info - Generating static pages (14/19)
00:33:39.278 | info - Generating static pages (19/19)
00:33:39.279 |  
00:33:39.280 | > Build error occurred
00:33:39.287 | Error: Export encountered errors on following paths:
00:33:39.288 | /design
00:33:39.288 | /welcome
00:33:39.288 | /write
00:33:39.288 | at /vercel/path0/node_modules/next/dist/export/index.js:493:19
00:33:39.288 | at runMicrotasks (<anonymous>)
00:33:39.289 | at processTicksAndRejections (internal/process/task_queues.js:95:5)
00:33:39.289 | at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/trace/trace.js:74:20)
00:33:39.289 | at async /vercel/path0/node_modules/next/dist/build/index.js:956:17
00:33:39.289 | at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/trace/trace.js:74:20)
00:33:39.289 | at async /vercel/path0/node_modules/next/dist/build/index.js:830:13
00:33:39.290 | at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/trace/trace.js:74:20)
00:33:39.290 | at async Object.build [as default] (/vercel/path0/node_modules/next/dist/build/index.js:80:25)
00:33:39.327 | error Command failed with exit code 1.
00:33:39.327 | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
00:33:39.345 | Error: Command "yarn run build" exited with 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions