"Module not found" error
Unanswered
Ichneumonid wasp posted this in #help-forum
Original message was deleted.
33 Replies
Asian black bear
do you have a
'use client'
directive on the page?Ichneumonid wasp
yes
is that the reason?
Asian black bear
no, you need it there
Ichneumonid wasp
for sure thanks, i still dont know what could be giving this error though
Asian black bear
yarn, npm, or pnpm?
Ichneumonid wasp
npm
Asian black bear
Actually everything looks right
I would delete
node_modules
and .next/
and hope it magically fixed the problem
Ichneumonid wasp
so by deleting those 2 directories will help?
why is that?
Asian black bear
I mean, it won't not help
Ichneumonid wasp
yea thats what im saying
Asian black bear
because the issue could be that either the next cache directory/dev server is in an invalid state (which has been a FREQUENT problem for me lately after all of their speedy caching improvments)
or it could be that the packages are somehow installed wrong/or have been tainted, such that running
npm install
again will fix themactually, I have been particularly been having trouble with the dev server seeing an error like that, and then literally ignoring future changes to the files
Ichneumonid wasp
i have done this already but to no avail
yes exactly and its super frustrating
Asian black bear
restarting the dev server usually fixes it for me
but I have had to wipe the .next directory as well
At Vercel they dogmatically insist caching can fix all performance issues, and with the last few releases of next the changelogs have talked a lot about "speed improvments"
Ichneumonid wasp
The issue was that when I committed, my main branch and master branch didn’t have the same code
So I had to merge both via terminal and it worked
Asian black bear
Oh that is a weird one, package manager mismatches in branches is a nightmare
Ichneumonid wasp
this is the project im working on
Asian black bear
So smooth
Ichneumonid wasp
seriously? the data is for trees
in nyc
Asian black bear
printing stuff on a map in a way that doesn't suck seems to be really hard
I have used enough terrible map widgets to know