#Missing _generated folder

8 messages · Page 1 of 1 (latest)

flint vineBOT
#

Hi @desert jewel. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

To create a new convex/_generated folder, you should run the following command in your project directory:

npx convex dev

This command will generate the convex/_generated directory, which contains code and type definitions specific to your app's data model and API. The generated files include api.js, api.d.ts, dataModel.d.ts, server.js, and server.d.ts Generated Code.

Alternatively, if you only want to update the generated code without starting the dev server, you can run:

npx convex codegen

This will update or create the files in the convex/_generated directory as well CLI: Deploy.

Make sure you are in the correct project directory (where your convex/ folder is located) when running these commands.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@desert jewel Kapa.ai is still learning and improving, please let me know how I did by reacting below.

#

Let me check the knowledge base for you again. One moment! :books:

#

The message No changes to the environment were made. Everything is already up to date. typically means that the command you ran (such as npx convex dev or a related CLI command) checked your current environment and found that there were no new changes to apply—so nothing needed to be updated or regenerated.

This is a normal message and indicates that your environment, code, and configuration are already in sync with what Convex expects. If you were expecting changes (for example, new functions, schema updates, or regenerated code), make sure you have actually made and saved those changes in your project files before running the command again.

If you are trying to generate the convex/_generated folder and see this message, but the folder is still missing, double-check that you are running the command in the correct directory (where your convex/ folder is located) and that your project is set up correctly Understanding: Dev workflow.

If the issue persists, there may be a deeper configuration or path issue, in which case reviewing your project structure and CLI output for errors would be the next step.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@desert jewel Kapa.ai is still learning and improving, please let me know how I did by reacting below.

flint vineBOT
#

Let me check the knowledge base for you again. One moment! :books:

#

The asyncMap export in convex-helpers is a utility function that allows you to map over an iterable with an asynchronous function and await all the results in parallel. It works similarly to Promise.all combined with Array.map, but is designed to be more ergonomic, especially when working with async operations in Convex queries and mutations.

Here’s a simplified version of how it works:

import { asyncMap } from "convex-helpers";

// Example usage:
const users = await asyncMap(userIds, async (id) => db.get(id));

The function signature is:

async function asyncMap(iterable, asyncTransform) {
  const promises = [];
  for (const item of iterable) {
    promises.push(asyncTransform(item));
  }
  return Promise.all(promises);
}

This helper is useful for running multiple asynchronous operations in parallel and collecting their results, such as fetching related documents from the database Mapping over async functions.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: