Skip to content

An interrupt was produced by #39 #668

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

Closed
vilkinsons opened this issue Aug 5, 2024 · 2 comments
Closed

An interrupt was produced by #39 #668

vilkinsons opened this issue Aug 5, 2024 · 2 comments

Comments

@vilkinsons
Copy link

vilkinsons commented Aug 5, 2024

When running pnpm run dev I get the following error, which prevents the dev server from evenstarting:

Contentlayer config change detected. Updating type definitions and data...
This error shouldn't have happened.

I'm trying to use Contentlayer with Next.js 14.2.5 (app router). Here's the corresponding stack trace:

╥
╠══╦══╗
║  ║  ║
║  ║  ╠─An interrupt was produced by #39.
║  ║  ║ 
║  ║  ▼
║  ║
║  ╠─An unchecked error was produced.
║  ║ 
║  ║ TypeError: Cannot read properties of undefined (reading 'type')
║  ║     at fieldListItemsToCoreFieldListDefItems (file:///Users/D/Git/vilkinsons/vilkinsons.com/node_modules/.pnpm/@[email protected][email protected]/node_modules/@contentlayer/source-files/src/schema/provideSchema.ts:248:28)
║  ║     at fieldDefEntryToCoreFieldDef (file:///Users/D/Git/vilkinsons/vilkinsons.com/node_modules/.pnpm/@[email protected][email protected]/node_modules/@contentlayer/source-files/src/schema/provideSchema.ts:159:13)
║  ║     at file:///Users/D/Git/vilkinsons/vilkinsons.com/node_modules/.pnpm/@[email protected][email protected]/node_modules/@contentlayer/source-files/src/schema/provideSchema.ts:26:9
║  ║     at Array.map (<anonymous>)
║  ║     at next (file:///Users/D/Git/vilkinsons/vilkinsons.com/node_modules/.pnpm/@[email protected][email protected]/node_modules/@contentlayer/source-files/src/schema/provideSchema.ts:25:70)
║  ║     at Generator.next (<anonymous>)
║  ║     at ISuspend.factory (file:///Users/D/Git/vilkinsons/vilkinsons.com/node_modules/.pnpm/@[email protected]/node_modules/@effect-ts/system/_src/Effect/gen.ts:135:28)
║  ║     at FiberContext.evaluateNow (file:///Users/D/Git/vilkinsons/vilkinsons.com/node_modules/.pnpm/@[email protected]/node_modules/@effect-ts/system/_src/Fiber/context.ts:1173:51)
║  ║     at file:///Users/D/Git/vilkinsons/vilkinsons.com/node_modules/.pnpm/@[email protected]/node_modules/@effect-ts/system/_src/Fiber/context.ts:576:33
║  ║     at file:///Users/D/Git/vilkinsons/vilkinsons.com/node_modules/.pnpm/@[email protected]/node_modules/@effect-ts/system/_src/Support/Scheduler/index.ts:15:9
║  ║ 
║  ║ Fiber: #41 (started at: 2024-08-05T07:26:03.063Z) was supposed to continue to: <empty trace>
║  ║ 
║  ║ Fiber: #41 (started at: 2024-08-05T07:26:03.063Z) Execution trace: <empty trace>
║  ║ 
║  ║ Fiber: #41 (started at: 2024-08-05T07:26:03.063Z) was spawned by:
║  ║ 
║  ║ Fiber: #39 (started at: 2024-08-05T07:26:03.062Z) was supposed to continue to: <empty trace>
║  ║ 
║  ║ Fiber: #39 (started at: 2024-08-05T07:26:03.062Z) Execution trace: <empty trace>
║  ║ 
║  ║ Fiber: #39 (started at: 2024-08-05T07:26:03.062Z) was spawned by:
║  ║ 
║  ║ Fiber: #37 (started at: 2024-08-05T07:26:03.062Z) was supposed to continue to: <empty trace>
║  ║ 
║  ║ Fiber: #37 (started at: 2024-08-05T07:26:03.062Z) Execution trace: <empty trace>
║  ║ 
║  ║ Fiber: #37 (started at: 2024-08-05T07:26:03.062Z) was spawned by:
║  ║ 
║  ║ Fiber: #26 (started at: 2024-08-05T07:26:03.058Z) was supposed to continue to: <empty trace>
║  ║ 
║  ║ Fiber: #26 (started at: 2024-08-05T07:26:03.058Z) Execution trace: <empty trace>
║  ║ 
║  ║ Fiber: #26 (started at: 2024-08-05T07:26:03.058Z) was spawned by:
║  ║ 
║  ║ Fiber: #5 (started at: 2024-08-05T07:26:02.755Z) was supposed to continue to: <empty trace>
║  ║ 
║  ║ Fiber: #5 (started at: 2024-08-05T07:26:02.755Z) Execution trace: <empty trace>
║  ║ 
║  ║ Fiber: #5 (started at: 2024-08-05T07:26:02.755Z) was spawned by:
║  ║ 
║  ║ Fiber: #0 (started at: 2024-08-05T07:26:02.746Z) was supposed to continue to: <empty trace>
║  ║ 
║  ║ Fiber: #0 (started at: 2024-08-05T07:26:02.746Z) Execution trace: <empty trace>
║  ║ 
║  ║ Fiber: #0 (started at: 2024-08-05T07:26:02.746Z) was spawned by: <empty trace>
║  ▼
▼

OS: darwin 23.6.0 (arch: arm64)
Process: /Users/D/.local/share/fnm/node-versions/v20.15.1/installation/bin/node /Users/D/Git/vilkinsons/vilkinsons.com/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/server/lib/start-server.js
Node version: v20.15.1
Contentlayer version: 0.3.4

This is a newly-bootstrapped project, with some example content thrown in the contentlayer.config.ts file and a package.json which contains:

"dependencies": {
   "contentlayer": "^0.3.4",
   "date-fns": "^3.6.0",
   "next": "14.2.5",
   "next-contentlayer": "^0.3.4",
   "react": "^18.3.1",
   "react-dom": "^18.3.1"
 },
 "devDependencies": {
   "@types/node": "^20.14.14",
   "@types/react": "^18.3.3",
   "@types/react-dom": "^18.3.0",
   "eslint": "^8.57.0",
   "eslint-config-next": "14.2.5",
   "typescript": "^5.5.4"
 }

If I can usefully provide any more information, please let me know.

I suspect my issue relates to (if not is duplicative of) #659

@TranslatorDlique
Copy link

Any solution to this yet? I'm having the same issue. For me it seems to be related to trying to set up images. in the docs it's set up like this for the contentlayer.config:

fields: { image: { type: string }, },

But that throws the error

ReferenceError: string is not defined

When I change is to

fields: { image: { type: "string" }, },

I get the exact same error. I've tried this using 0.3.4 and 0.3.2 using Node v16.17.0

Copy link

stale bot commented Oct 12, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the meta: stale label Oct 12, 2024
@stale stale bot closed this as completed Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants