contentlayer not importing
Unanswered
Beans posted this in #help-forum
BeansOP
contentlayer not importing. accidentally deleted my contentlayer folder, but put it back and now it won't import properly. see image.
31 Replies
BeansOP
note that the project deploys to vercel fine. however, i now cannot view definitions for my post. for example, post.summary "doesn't have a definition" because it cant find the contentlayer folder (i think).
B
for example, post.slug here
i think the issue is that the import cannot find the contentlayer/generated file. but i have no idea why.
Lapland Longspur
Try to uninstall it first then install again
@Lapland Longspur Try to uninstall it first then install again
BeansOP
Uninstall content layer?
@Beans Uninstall content layer?
Lapland Longspur
Is that an npm package?
@Lapland Longspur Is that an npm package?
BeansOP
Well yeah, it’s so I can use mdx files for my project descriptions
But it’s also a file
Lapland Longspur
I've ran the same issue before and what I did was
npm uninstall <pkg_name> and then npm i <pkg_name> and it solved my issueLapland Longspur
Can i see your package.json file
@Beans Click to see attachment
Lapland Longspur
Strange. It's not removing packages when running npm uninstall
@Lapland Longspur Strange. It's not removing packages when running npm uninstall
BeansOP
perhaps i'll try pnpm
@Lapland Longspur Strange. It's not removing packages when running npm uninstall
BeansOP
follow up question. I'm trying to add these techstack and github things to my mdx
but it gives this error:
bhut it clearly does exizst
because im defining it right there
and this is the issue when i try and use pnpm to install/uninstall