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
Do you have
convex
installed?
How do you install packages in your yarn setup?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!
for example the convex directory exists with _generated underneath it
Oh weird, I missed you said you're not using Yarn
Stack Overflow says
rm -rf node_modules .yarn .pnp.* yarn.lock
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
what directory are you in when you install convex?
/corrections-management, which is the main projecrt directory for this nextjs app