Tyler Douglas
Tyler Douglas5mo ago

Yarn error when not using Yarn?

I really want to use convex in my new Next.js project but after following the quick start guide I keep running into the same issue when I run "npx convex dev". I'm using npm, not yarn. Does anybody know how to fix this problem? ✘ [ERROR] Could not resolve "convex/server" convex/_generated/server.js:20:7: 20 │ } from "convex/server"; ╵ ~~~ The Yarn Plug'n'Play manifest forbids importing "convex" here because it's not listed as a dependency of this package: ../.pnp.cjs:38:33: 38 │ "packageDependencies": [\ ╵ ~~ You can mark the path "convex/server" as external to exclude it from the bundle, which will remove this error.
7 Replies
ballingt
ballingt5mo ago
Do you have convex installed? How do you install packages in your yarn setup?
Tyler Douglas
Tyler DouglasOP5mo ago
I don't use yarn which is why this is wierd. Yes, I ran npm instal convex. Convex added it's stuff to my nextjs project thanks for the quick reply!
Tyler Douglas
Tyler DouglasOP5mo ago
for example the convex directory exists with _generated underneath it
No description
ballingt
ballingt5mo ago
Oh weird, I missed you said you're not using Yarn Stack Overflow says rm -rf node_modules .yarn .pnp.* yarn.lock
Tyler Douglas
Tyler DouglasOP5mo ago
thanks Tom, no dice. After I run that and then try npx convex dev again I'mn aske to proceed with installing convex@1.15.0 and when I do I get the same error
ballingt
ballingt5mo ago
what directory are you in when you install convex?
Tyler Douglas
Tyler DouglasOP5mo ago
/corrections-management, which is the main projecrt directory for this nextjs app

Did you find this page helpful?