This error shouldn't have happened.
bhatvikrant opened this issue · 4 comments
bhatvikrant commented
This error shouldn't have happened. Please consider opening a GitHub issue with the stack trace below here:
https://github.com/contentlayerdev/contentlayer/issues
An unchecked error was produced.
TypeError: esbuild.context is not a function
at T.tryCatchPromise.UnknownEsbuildError.error.error (file:///Users/viki/Desktop/grovr/node_modules/.pnpm/@contentlayer+core@0.3.4_esbuild@0.16.4/node_modules/@contentlayer/core/dist/getConfig/esbuild.js:64:79)
at file:///Users/viki/Desktop/grovr/node_modules/.pnpm/@effect-ts+system@0.57.5/node_modules/@effect-ts/system/_mjs/Effect/promise.mjs:13:5
at file:///Users/viki/Desktop/grovr/node_modules/.pnpm/@effect-ts+system@0.57.5/node_modules/@effect-ts/system/_mjs/Effect/effectAsync.mjs:30:5
at FiberContext.evaluateNow (file:///Users/viki/Desktop/grovr/node_modules/.pnpm/@effect-ts+system@0.57.5/node_modules/@effect-ts/system/_mjs/Fiber/context.mjs:892:35)
at file:///Users/viki/Desktop/grovr/node_modules/.pnpm/@effect-ts+system@0.57.5/node_modules/@effect-ts/system/_mjs/Fiber/context.mjs:504:33
at file:///Users/viki/Desktop/grovr/node_modules/.pnpm/@effect-ts+system@0.57.5/node_modules/@effect-ts/system/_mjs/Support/Scheduler/index.mjs:11:22
Fiber: #6 (started at: 2023-12-05T20:03:03.124Z) was supposed to continue to: <empty trace>
Fiber: #6 (started at: 2023-12-05T20:03:03.124Z) Execution trace: <empty trace>
Fiber: #6 (started at: 2023-12-05T20:03:03.124Z) was spawned by: <empty trace>
OS: darwin 23.2.0 (arch: arm64)
Process: /usr/local/bin/node /Users/viki/Desktop/grovr/node_modules/contentlayer/bin/cli.cjs build
Node version: v18.14.1
Contentlayer version: 0.3.4
bhatvikrant commented
nicu-chiciuc commented
@bhatvikrant
I'm having the same issue, how did you solve it?
pnpm -F tsx_md run dev
> tsx_md@ dev /Users/nicu/dev/important/tsx_md/apps/tsx_md
> next dev -p 3020
▲ Next.js 14.0.2
- Local: http://localhost:3020
This error shouldn't have happened. Please consider opening a GitHub issue with the stack trace below here:
https://github.com/contentlayerdev/contentlayer/issues
An unchecked error was produced.
TypeError: esbuild.context is not a function
at T.tryCatchPromise.UnknownEsbuildError.error.error (file:///Users/nicu/dev/important/tsx_md/node_modules/.pnpm/@contentlayer+core@0.3.4_esbuild@0.14.47/node_modules/@contentlayer/core/dist/getConfig/esbuild.js:64:79)
at file:///Users/nicu/dev/important/tsx_md/node_modules/.pnpm/@effect-ts+system@0.57.5/node_modules/@effect-ts/system/_mjs/Effect/promise.mjs:13:5
at file:///Users/nicu/dev/important/tsx_md/node_modules/.pnpm/@effect-ts+system@0.57.5/node_modules/@effect-ts/system/_mjs/Effect/effectAsync.mjs:30:5
at FiberContext.evaluateNow (file:///Users/nicu/dev/important/tsx_md/node_modules/.pnpm/@effect-ts+system@0.57.5/node_modules/@effect-ts/system/_mjs/Fiber/context.mjs:892:35)
at file:///Users/nicu/dev/important/tsx_md/node_modules/.pnpm/@effect-ts+system@0.57.5/node_modules/@effect-ts/system/_mjs/Fiber/context.mjs:504:33
at file:///Users/nicu/dev/important/tsx_md/node_modules/.pnpm/@effect-ts+system@0.57.5/node_modules/@effect-ts/system/_mjs/Support/Scheduler/index.mjs:11:22
Fiber: #5 (started at: 2024-02-08T21:09:22.853Z) was supposed to continue to: <empty trace>
Fiber: #5 (started at: 2024-02-08T21:09:22.853Z) Execution trace: <empty trace>
Fiber: #5 (started at: 2024-02-08T21:09:22.853Z) was spawned by:
Fiber: #0 (started at: 2024-02-08T21:09:22.843Z) was supposed to continue to: <empty trace>
Fiber: #0 (started at: 2024-02-08T21:09:22.843Z) Execution trace: <empty trace>
Fiber: #0 (started at: 2024-02-08T21:09:22.843Z) was spawned by: <empty trace>
OS: darwin 21.6.0 (arch: arm64)
Process: /Users/nicu/.local/share/nvm/v18.18.2/bin/node /Users/nicu/dev/important/tsx_md/node_modules/.pnpm/next@14.0.2_@babel+core@7.22.5_@opentelemetry+api@1.7.0_react-dom@18.2.0_react@18.2.0_sass@1.70.0/node_modules/next/dist/server/lib/start-server.js
Node version: v18.18.2
Contentlayer version: 0.3.4
prasadKodeInCloud commented
Adding esbuild version in peer dependencies fixed the issue for me.
package.json
"peerDependencies": {
"esbuild": "0.17.x || 0.18.x"
}
XacK7 commented
Adding esbuild version in peer dependencies fixed the issue for me.
package.json
"peerDependencies": { "esbuild": "0.17.x || 0.18.x" }
This worked , Thank you big time !!