JohnK
JohnK2mo ago

Turborepo

I'm fiddling around to get a turborepo working. Everything is fine but running "npx convex dev" inside project/packages/backend gives me: Could not resolve "fs" ../../node_modules/next/dist/compiled/gzip-size/index.js:1:2840: 1 │ ...)?processFn(o,r):o}return n}},147:e=>{"use strict";e.exports=require("fs")},781:e=>{"use strict";e.exports=require("stream")},796:e=>{"use str...} The package "fs" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error. Could not resolve "stream" ../../node_modules/next/dist/compiled/gzip-size/index.js:1:2886:...";e.exports=require("fs")},781:e=>{"use strict";e.exports=require("stream")},796:e=>{"use strict";e.exports=require("zlib")}};var r={};functi... The package "stream" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error. Could not resolve "zlib" ../../node_modules/next/dist/compiled/gzip-size/index.js:1:2936: 1 │ ...e.exports=require("stream")},796:e=>{"use strict";e.exports=require("zlib")}};var r={};function nccwpck_require(t){var n=r[t];if(n!==undef... The package "zlib" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error. package.json in project/packages/backend: { "name": "@packages/backend", "version": "1.0.0", "description": "", "author": "", "license": "ISC", "scripts": { "dev": "convex dev", }, "dependencies": { "@clerk/backend": "^1.18.0", "@packages/types": "*", "convex": "^1.17.3" } } I had a look at https://www.convex.dev/templates/monorepo but everything is setup the same. Am I missing something obvious?
Monorepo with Next.js and Expo
Fullstack monorepo template feat. Expo, Turbo, Next.js, Convex, Clerk This is a modern TypeScript monorepo template with AI web and native apps featuring: - Turborepo: Monorepo management - Next.js 13: Web app & marketing page - React Native Expo: Mobile/native app - Convex: Backend, database, server functions - [Clerk](ht...
2 Replies
Convex Bot
Convex Bot2mo ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
JohnK
JohnKOP2mo ago
Nevermind, just had to regenerate everything again!

Did you find this page helpful?