#"Module not found" error

33 messages · Page 1 of 1 (latest)

cinder wigeonBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

      🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in <id:customize>

      ✅ You can mark a message as the answer for your post with `Right click -> Apps -> Mark Solution`
      (if you don't see the option, try refreshing Discord with Ctrl + R)
violet zephyr
#

do you have a 'use client' directive on the page?

coral shard
#

yes

#

is that the reason?

violet zephyr
#

no, you need it there

coral shard
#

for sure thanks, i still dont know what could be giving this error though

violet zephyr
#

yarn, npm, or pnpm?

coral shard
#

npm

violet zephyr
#

Actually everything looks right

#

I would delete node_modules and .next/

#

and hope it magically fixed the problem

coral shard
#

so by deleting those 2 directories will help?

#

why is that?

violet zephyr
#

I mean, it won't not help

coral shard
violet zephyr
#

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 them

#

actually, 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

coral shard
coral shard
violet zephyr
#

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"

coral shard
#

So I had to merge both via terminal and it worked

violet zephyr
#

Oh that is a weird one, package manager mismatches in branches is a nightmare

coral shard
#

this is the project im working on

violet zephyr
#

So smooth

coral shard
#

seriously? the data is for trees

#

in nyc

violet zephyr
#

printing stuff on a map in a way that doesn't suck seems to be really hard