content-collections icon indicating copy to clipboard operation
content-collections copied to clipboard

Build Error - Cannot read properties of undefined (reading 'collections')

Open RanNahmany opened this issue 1 year ago • 1 comments

hi all

I switched from windows to a macos For a project that works on Windows, I get now an exception error in Mac when I'm trying to run "npm run dev" or "pnpm dev" in a nextjs project. the error i get is:

TypeError: Cannot read properties of undefined (reading 'collections') original module path - "node_modules/@content-collections/integrations/src/index.ts"

when i entered the "exception file" i saw that it is looking for "stats -> documents" and "stats -> collections" inside the event of the "builder:end", which is not exists when i print it to console. only "startedAt" and "endedAt": image image

Can anyone help me with this one? Thanks in advance!

the original error when i run "npm run dev" or "pnpm dev" image

RanNahmany avatar Oct 12 '24 20:10 RanNahmany

This looks like a mismatch between @content-collections/core and content-collections/integrations. Can you try to upgrade @content-collections/core?

sdorra avatar Oct 13 '24 07:10 sdorra

This looks like a mismatch between @content-collections/core and content-collections/integrations. Can you try to upgrade @content-collections/core?

**Solved it! Thank you @sdorra **

RanNahmany avatar Oct 13 '24 15:10 RanNahmany