Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next.js 13 + mdx-bundler error #307

Closed
willin opened this issue Dec 10, 2022 · 11 comments
Closed

Next.js 13 + mdx-bundler error #307

willin opened this issue Dec 10, 2022 · 11 comments

Comments

@willin
Copy link

willin commented Dec 10, 2022

pnpm dev

> [email protected] dev /Users/v0/Sites/alpha
> next dev -p 5200

ready - started server on 0.0.0.0:5200, url: http://localhost:5200
warn  - You have enabled experimental features (appDir, esmExternals, serverComponentsExternalPackages) in next.config.js.
warn  - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.
info  - Thank you for testing `appDir` please leave your feedback at https://nextjs.link/app-feedback

event - compiled client and server successfully in 407 ms (206 modules)
wait  - compiling /middleware (client and server)...
event - compiled successfully in 45 ms (81 modules)
wait  - compiling /[locale]/(content)/posts/[slug]/page (client and server)...
warn  - ./node_modules/.pnpm/[email protected]/node_modules/node-fetch/lib/index.js
Module not found: Can't resolve 'encoding' in '/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]/node_modules/node-fetch/lib'
[Function: Page] {
  params: { locale: 'zh-CN', slug: 'nextjs-13-app-dir-i18n' },
  searchParams: {}
}
error running remarkCodeHike [Error: ENOENT: no such file or directory, open '/Users/v0/Sites/alpha/.next/server/app/[locale]/(content)/posts/languages/abap.tmLanguage.json'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/Users/v0/Sites/alpha/.next/server/app/[locale]/(content)/posts/languages/abap.tmLanguage.json'
}
✘ [ERROR] [plugin @mdx-js/esbuild] Error: ENOENT: no such file or directory, open '/Users/v0/Sites/alpha/.next/server/app/[locale]/(content)/posts/languages/abap.tmLanguage.json'

    _mdx_bundler_entry_point-a735c29a-3082-4d02-9867-5aefd7e28090.mdx:0:0:
      0 │ 
        ╵ ^

Error: Build failed with 1 error:
_mdx_bundler_entry_point-a735c29a-3082-4d02-9867-5aefd7e28090.mdx:0:0: ERROR: [plugin: @mdx-js/esbuild] Error: ENOENT: no such file or directory, open '/Users/v0/Sites/alpha/.next/server/app/[locale]/(content)/posts/languages/abap.tmLanguage.json'
    at failureErrorWithLog (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1624:15)
    at /Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1266:28
    at runOnEndCallbacks (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1046:63)
    at buildResponseToResult (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1264:7)
    at /Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1377:14
    at /Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:678:9
    at handleIncomingPacket (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:775:9)
    at Socket.readFromStdout (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:644:7)
    at Socket.emit (node:events:513:28)
    at addChunk (node:internal/streams/readable:324:12)
    at readableAddChunk (node:internal/streams/readable:297:9)
    at Readable.push (node:internal/streams/readable:234:10)
    at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)
    at Pipe.callbackTrampoline (node:internal/async_hooks:132:17) {
  errors: [
    {
      detail: [Error],
      id: '',
      location: [Object],
      notes: [],
      pluginName: '@mdx-js/esbuild',
      text: "Error: ENOENT: no such file or directory, open '/Users/v0/Sites/alpha/.next/server/app/[locale]/(content)/posts/languages/abap.tmLanguage.json'"
    }
  ],
  warnings: []
}
Error: Build failed with 1 error:
_mdx_bundler_entry_point-a735c29a-3082-4d02-9867-5aefd7e28090.mdx:0:0: ERROR: [plugin: @mdx-js/esbuild] Error: ENOENT: no such file or directory, open '/Users/v0/Sites/alpha/.next/server/app/[locale]/(content)/posts/languages/abap.tmLanguage.json'
    at failureErrorWithLog (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1624:15)
    at /Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1266:28
    at runOnEndCallbacks (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1046:63)
    at buildResponseToResult (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1264:7)
    at /Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1377:14
    at /Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:678:9
    at handleIncomingPacket (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:775:9)
    at Socket.readFromStdout (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:644:7)
    at Socket.emit (node:events:513:28)
    at addChunk (node:internal/streams/readable:324:12)
    at readableAddChunk (node:internal/streams/readable:297:9)
    at Readable.push (node:internal/streams/readable:234:10)
    at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)
    at Pipe.callbackTrampoline (node:internal/async_hooks:132:17) {
  digest: '567953701'
}
error - unhandledRejection: Error: ENOENT: no such file or directory, open '(sc_server)/node_modules/.pnpm/[email protected]/node_modules/vscode-oniguruma/release/onig.wasm'
    at Object.openSync (node:fs:591:3)
    at Object.readFileSync (node:fs:459:35)
    at getOniguruma (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/shiki/dist/index.js:1968:32)
    at getHighlighter (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/shiki/dist/index.js:2436:36)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/@[email protected][email protected]/node_modules/@code-hike/mdx/dist/index.esm.mjs:929:87)
    at Generator.next (<anonymous>)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/@[email protected][email protected]/node_modules/@code-hike/mdx/dist/index.esm.mjs:67:71)
    at new Promise (<anonymous>)
    at __awaiter (webpack-internal:///(sc_server)/./node_modules/.pnpm/@[email protected][email protected]/node_modules/@code-hike/mdx/dist/index.esm.mjs:49:12)
    at highlight (webpack-internal:///(sc_server)/./node_modules/.pnpm/@[email protected][email protected]/node_modules/@code-hike/mdx/dist/index.esm.mjs:902:12)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/@[email protected][email protected]/node_modules/@code-hike/mdx/dist/index.esm.mjs:1194:26)
    at Generator.next (<anonymous>)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/@[email protected][email protected]/node_modules/@code-hike/mdx/dist/index.esm.mjs:67:71)
    at new Promise (<anonymous>)
    at __awaiter (webpack-internal:///(sc_server)/./node_modules/.pnpm/@[email protected][email protected]/node_modules/@code-hike/mdx/dist/index.esm.mjs:49:12)
    at mapFile (webpack-internal:///(sc_server)/./node_modules/.pnpm/@[email protected][email protected]/node_modules/@code-hike/mdx/dist/index.esm.mjs:1191:12)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/@[email protected][email protected]/node_modules/@code-hike/mdx/dist/index.esm.mjs:1143:28)
    at Generator.next (<anonymous>)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/@[email protected][email protected]/node_modules/@code-hike/mdx/dist/index.esm.mjs:67:71)
    at new Promise (<anonymous>)
    at __awaiter (webpack-internal:///(sc_server)/./node_modules/.pnpm/@[email protected][email protected]/node_modules/@code-hike/mdx/dist/index.esm.mjs:49:12)
    at mapCode (webpack-internal:///(sc_server)/./node_modules/.pnpm/@[email protected][email protected]/node_modules/@code-hike/mdx/dist/index.esm.mjs:1142:12)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/@[email protected][email protected]/node_modules/@code-hike/mdx/dist/index.esm.mjs:1135:20)
    at Generator.next (<anonymous>)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/@[email protected][email protected]/node_modules/@code-hike/mdx/dist/index.esm.mjs:67:71)
    at new Promise (<anonymous>)
    at __awaiter (webpack-internal:///(sc_server)/./node_modules/.pnpm/@[email protected][email protected]/node_modules/@code-hike/mdx/dist/index.esm.mjs:49:12)
    at mapAnyCodeNode (webpack-internal:///(sc_server)/./node_modules/.pnpm/@[email protected][email protected]/node_modules/@code-hike/mdx/dist/index.esm.mjs:1132:12)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/@[email protected][email protected]/node_modules/@code-hike/mdx/dist/index.esm.mjs:1320:26)
    at Generator.next (<anonymous>)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/@[email protected][email protected]/node_modules/@code-hike/mdx/dist/index.esm.mjs:67:71)
    at new Promise (<anonymous>)
    at __awaiter (webpack-internal:///(sc_server)/./node_modules/.pnpm/@[email protected][email protected]/node_modules/@code-hike/mdx/dist/index.esm.mjs:49:12)
    at transformCode (webpack-internal:///(sc_server)/./node_modules/.pnpm/@[email protected][email protected]/node_modules/@code-hike/mdx/dist/index.esm.mjs:1317:12)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/@[email protected][email protected]/node_modules/@code-hike/mdx/dist/index.esm.mjs:1307:27)
    at Generator.next (<anonymous>)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/@[email protected][email protected]/node_modules/@code-hike/mdx/dist/index.esm.mjs:67:71)
    at new Promise (<anonymous>)
    at __awaiter (webpack-internal:///(sc_server)/./node_modules/.pnpm/@[email protected][email protected]/node_modules/@code-hike/mdx/dist/index.esm.mjs:49:12)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/@[email protected][email protected]/node_modules/@code-hike/mdx/dist/index.esm.mjs:1304:63)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/@[email protected][email protected]/node_modules/@code-hike/mdx/dist/index.esm.mjs:840:28)
    at overload (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/unist-util-visit/index.js:20:16)
    at visit (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/unist-util-visit-parents/index.js:36:35)
    at visit (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/unist-util-visit-parents/index.js:44:85)
    at visitParents (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/unist-util-visit-parents/index.js:21:28)
    at visit (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/unist-util-visit/index.js:16:5)
    at visit (webpack-internal:///(sc_server)/./node_modules/.pnpm/@[email protected][email protected]/node_modules/@code-hike/mdx/dist/index.esm.mjs:71:5)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/@[email protected][email protected]/node_modules/@code-hike/mdx/dist/index.esm.mjs:839:9)
    at Generator.next (<anonymous>)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/@[email protected][email protected]/node_modules/@code-hike/mdx/dist/index.esm.mjs:67:71) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '(sc_server)/node_modules/.pnpm/[email protected]/node_modules/vscode-oniguruma/release/onig.wasm'
}
error running remarkCodeHike [Error: ENOENT: no such file or directory, open '/Users/v0/Sites/alpha/.next/server/app/[locale]/(content)/posts/languages/abap.tmLanguage.json'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/Users/v0/Sites/alpha/.next/server/app/[locale]/(content)/posts/languages/abap.tmLanguage.json'
}

✘ [ERROR] [plugin @mdx-js/esbuild] Error: ENOENT: no such file or directory, open '/Users/v0/Sites/alpha/.next/server/app/[locale]/(content)/posts/languages/abap.tmLanguage.json'

    _mdx_bundler_entry_point-da1a26ba-5f10-4573-a874-15c5ef52ffcd.mdx:0:0:
      0 │ 
@willin
Copy link
Author

willin commented Dec 10, 2022

check docs, added config:

/** @type {import('next').NextConfig} */
const nextConfig = {
  reactStrictMode: true, // Recommended for the `pages` directory, default in `app`.
  experimental: {
    // runtime: 'experimental-edge', // 'node.js' (default) | 'experimental-edge'
    appDir: true,
    esmExternals: 'loose',
    serverComponentsExternalPackages: ['esbuild', '@mdx-js/esbuild', 'shiki', '@code-hike/mdx', 'mdx-bundler']
  }
};

module.exports = nextConfig;

then error:

wait  - compiling /_error (client and server)...
warn  - Fast Refresh had to perform a full reload due to a runtime error.
event - compiled client and server successfully in 161 ms (1305 modules)
Warning: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
TypeError: Cannot read properties of null (reading 'useState')
    at Object.useState (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react/cjs/react.development.js:1753:21)
    at Code (/Users/v0/Sites/alpha/node_modules/.pnpm/@[email protected][email protected]/node_modules/@code-hike/mdx/dist/components.cjs.js:3412:55)
    at attemptResolveElement (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1207:42)
    at resolveModelToJSON (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1660:53)
    at Array.toJSON (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1121:40)
    at stringify (<anonymous>)
    at processModelChunk (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:172:36)
    at retryTask (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1868:50)
    at performWork (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1906:33)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1297:40)
    at scheduleWork (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:52:25)
    at pingTask (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1296:29)
    at ping (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1309:40)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
TypeError: Cannot read properties of null (reading 'useState')
    at Object.useState (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react/cjs/react.development.js:1753:21)
    at Code (/Users/v0/Sites/alpha/node_modules/.pnpm/@[email protected][email protected]/node_modules/@code-hike/mdx/dist/components.cjs.js:3412:55)
    at attemptResolveElement (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1207:42)
    at resolveModelToJSON (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1660:53)
    at Array.toJSON (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1121:40)
    at stringify (<anonymous>)
    at processModelChunk (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:172:36)
    at retryTask (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1868:50)
    at performWork (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1906:33)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1297:40)
    at scheduleWork (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:52:25)
    at pingTask (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1296:29)
    at ping (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1309:40)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  digest: '3489959199'
}
error - ui/mdx-component.tsx (19:2) @ CH
error - ReferenceError: CH is not defined
    at eval (webpack-internal:///(sc_server)/./ui/mdx-component.tsx:28:5)
    at (sc_server)/./ui/mdx-component.tsx (/Users/v0/Sites/alpha/.next/server/app/[locale]/(content)/[slug]/page.js:1823:1)
    at __webpack_require__ (/Users/v0/Sites/alpha/.next/server/webpack-runtime.js:33:42)
    at eval (webpack-internal:///(sc_server)/./ui/content-page.tsx:9:72)
    at (sc_server)/./ui/content-page.tsx (/Users/v0/Sites/alpha/.next/server/app/[locale]/(content)/[slug]/page.js:1802:1)
    at __webpack_require__ (/Users/v0/Sites/alpha/.next/server/webpack-runtime.js:33:42)
    at eval (webpack-internal:///(sc_server)/./app/[locale]/(content)/[slug]/page.tsx:6:74)
    at (sc_server)/./app/[locale]/(content)/[slug]/page.tsx (/Users/v0/Sites/alpha/.next/server/app/[locale]/(content)/[slug]/page.js:745:1)
    at Function.__webpack_require__ (/Users/v0/Sites/alpha/.next/server/webpack-runtime.js:33:42)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  type: 'ReferenceError',
  page: '/[locale]/[slug]'
}
  17 |   //   }),
  18 |   AgeTimer: AgeTimer,
> 19 |   CH
     |  ^
  20 | };
  21 | 
  22 | /**
Warning: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
TypeError: Cannot read properties of null (reading 'useState')
    at Object.useState (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react/cjs/react.development.js:1753:21)
    at Code (/Users/v0/Sites/alpha/node_modules/.pnpm/@[email protected][email protected]/node_modules/@code-hike/mdx/dist/components.cjs.js:3412:55)
    at attemptResolveElement (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1207:42)
    at resolveModelToJSON (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1660:53)
    at Array.toJSON (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1121:40)
    at stringify (<anonymous>)
    at processModelChunk (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:172:36)
    at retryTask (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1868:50)
    at performWork (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1906:33)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1297:40)
    at scheduleWork (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:52:25)
    at pingTask (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1296:29)
    at ping (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1309:40)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
TypeError: Cannot read properties of null (reading 'useState')
    at Object.useState (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react/cjs/react.development.js:1753:21)
    at Code (/Users/v0/Sites/alpha/node_modules/.pnpm/@[email protected][email protected]/node_modules/@code-hike/mdx/dist/components.cjs.js:3412:55)
    at attemptResolveElement (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1207:42)
    at resolveModelToJSON (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1660:53)
    at Array.toJSON (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1121:40)
    at stringify (<anonymous>)
    at processModelChunk (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:172:36)
    at retryTask (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1868:50)
    at performWork (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1906:33)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1297:40)
    at scheduleWork (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:52:25)
    at pingTask (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1296:29)
    at ping (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1309:40)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  digest: '3489959199'
}

@willin
Copy link
Author

willin commented Dec 10, 2022

or add use client:

wait  - compiling...
event - compiled client and server successfully in 250 ms (1324 modules)
warn  - Fast Refresh had to perform a full reload due to a runtime error.
[Function: Page] { params: { locale: 'en', slug: 'about' }, searchParams: {} }
[Function: Page] { params: { locale: 'en', slug: 'about' }, searchParams: {} }
wait  - compiling /[locale]/(content)/posts/page (client and server)...
TypeError: Cannot read properties of undefined (reading 'length')
    at InnerCode (webpack-internal:///(sc_client)/./node_modules/.pnpm/@[email protected][email protected]/node_modules/@code-hike/mdx/dist/components.esm.mjs:3448:21)
    at renderWithHooks (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:7681:16)
    at renderIndeterminateComponent (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:7755:15)
    at renderElement (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:7990:7)
    at renderNodeDestructiveImpl (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8157:11)
    at renderNodeDestructive (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8129:14)
    at renderIndeterminateComponent (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:7809:7)
    at renderElement (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:7990:7)
    at renderLazyComponent (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:7970:3)
    at renderElement (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8080:11)
    at renderNodeDestructiveImpl (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8157:11)
    at renderNodeDestructive (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8129:14)
    at renderNode (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8313:12)
    at renderChildrenArray (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8265:7)
    at renderNodeDestructiveImpl (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8194:7)
    at renderNodeDestructive (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8129:14)
    at renderNode (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8313:12)
    at renderHostElement (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:7665:3)
    at renderElement (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:7996:5)
    at renderNodeDestructiveImpl (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8157:11)
    at renderNodeDestructive (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8129:14)
    at renderNode (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8313:12)
    at renderChildrenArray (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8265:7)
    at renderNodeDestructiveImpl (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8194:7)
    at renderNodeDestructive (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8129:14)
    at renderNode (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8313:12)
    at renderHostElement (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:7665:3)
    at renderElement (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:7996:5)
    at renderNodeDestructiveImpl (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8157:11)
    at renderNodeDestructive (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8129:14)
    at renderNodeDestructiveImpl (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8188:11)
    at renderNodeDestructive (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8129:14)
    at retryTask (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8599:5)
    at performWork (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8666:7)
    at /Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:7378:14
    at scheduleWork (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:78:3)
    at pingTask (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:7377:5)
    at ping (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:7410:14)
    at wakeChunk (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/client.js:299:5)
    at wakeChunkIfInitialized (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/client.js:306:7)
    at resolveModelChunk (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/client.js:368:5)
    at resolveModel (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/client.js:635:5)
    at processFullRow (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/client.js:729:9)
    at processBinaryChunk (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/client.js:789:5)
    at progress (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/client.js:842:5)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
event - compiled successfully in 69 ms (750 modules)
TypeError: Cannot read properties of undefined (reading 'length')
    at InnerCode (webpack-internal:///(sc_client)/./node_modules/.pnpm/@[email protected][email protected]/node_modules/@code-hike/mdx/dist/components.esm.mjs:3448:21)
    at renderWithHooks (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:7681:16)
    at renderIndeterminateComponent (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:7755:15)
    at renderElement (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:7990:7)
    at renderNodeDestructiveImpl (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8157:11)
    at renderNodeDestructive (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8129:14)
    at renderIndeterminateComponent (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:7809:7)
    at renderElement (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:7990:7)
    at renderLazyComponent (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:7970:3)
    at renderElement (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8080:11)
    at renderNodeDestructiveImpl (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8157:11)
    at renderNodeDestructive (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8129:14)
    at renderNode (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8313:12)
    at renderChildrenArray (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8265:7)
    at renderNodeDestructiveImpl (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8194:7)
    at renderNodeDestructive (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8129:14)
    at renderNode (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8313:12)
    at renderHostElement (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:7665:3)
    at renderElement (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:7996:5)
    at renderNodeDestructiveImpl (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8157:11)
    at renderNodeDestructive (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8129:14)
    at renderNode (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8313:12)
    at renderChildrenArray (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8265:7)
    at renderNodeDestructiveImpl (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8194:7)
    at renderNodeDestructive (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8129:14)
    at renderNode (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8313:12)
    at renderHostElement (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:7665:3)
    at renderElement (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:7996:5)
    at renderNodeDestructiveImpl (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8157:11)
    at renderNodeDestructive (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8129:14)
    at renderNodeDestructiveImpl (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8188:11)
    at renderNodeDestructive (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8129:14)
    at retryTask (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8599:5)
    at performWork (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:8666:7)
    at /Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:7378:14
    at scheduleWork (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:78:3)
    at pingTask (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:7377:5)
    at ping (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js:7410:14)
    at wakeChunk (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/client.js:299:5)
    at wakeChunkIfInitialized (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/client.js:306:7)
    at resolveModelChunk (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/client.js:368:5)
    at resolveModel (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/client.js:635:5)
    at processFullRow (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/client.js:729:9)
    at processBinaryChunk (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/client.js:789:5)
    at progress (/Users/v0/Sites/alpha/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react-server-dom-webpack/client.js:842:5)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

@willin
Copy link
Author

willin commented Dec 10, 2022

Example source: https://github.com/willin/beta.willin.wang/blob/main/ui/mdx-component.tsx#L5

can edit here:

'use client'; // add this line, optional
import { CH } from '@codehike/mdx/components'; // add this line
import { getMDXComponent } from 'mdx-bundler/client';
import { createElement, useMemo } from 'react';
import { AgeTimer } from './components/age-timer';

const mdxComponents = {
  CH, // add this line
  a: (props: any) =>
    createElement('a', {
      target: '_blank',
      ...props
    }),
  // img: ({ src, ...rest }) =>
  //   createElement('img', {
  //     // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
  //     'data-src': src,
  //     className: 'post-image lazyload',
  //     ...rest
  //   }),
  AgeTimer: AgeTimer
};

@pomber
Copy link
Contributor

pomber commented Dec 17, 2022

PR #308 may fix this. If you can, try using the canary version from that PR and let me know if it fixes the problem

@staranbeer
Copy link

I'm facing a similar issue with next 13 but the only difference is that I get the error only in production. I get a 500 server error whenever I try to access my website.

PR #308 may fix this. If you can, try using the canary version from that PR and let me know if it fixes the problem

I've also tried this method as well but It didn't work.

@pomber
Copy link
Contributor

pomber commented Dec 23, 2022

@staranbeer are you using getStaticProps? getServerSideProps? the app folder?

@staranbeer
Copy link

staranbeer commented Dec 23, 2022

@pomber I'm using getServerSideProps for this.

@pomber
Copy link
Contributor

pomber commented Dec 23, 2022

If you can try using getStaticProps. I'm trying to make getServerSideProps work in the next version

@staranbeer
Copy link

Oh, that might not be possible with the kind of app I'm working on. It need to fetch data on every request.

here's the app readout .

@pomber
Copy link
Contributor

pomber commented Dec 23, 2022

can you try the new canary version from #308 and share the error you are getting?

@pomber
Copy link
Contributor

pomber commented Jan 16, 2023

should be fixed with v0.8.0, let me know how it goes

@pomber pomber closed this as completed Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants