Issues with migration in self hosted

Im trying to run Novu on 0.23 and i had several issues running migrations. 1. I had to rebuild the package application-generic because i was getting an error for @novu/sendgrid used inside it. I think this error applies to all migrations that builds the nest app. 2. some migrations simply doesnt execute a function. I had to modify them to execute something: encrypt-credentials-migration.ts, add-integration-identifier-migration.ts, seen-read-suport. Is there anything i've been missing? I just followed the docs, that tells you to run npm run setup:project and then run the migrations.
3 Replies
Ask Inkeep
Ask Inkeep7mo ago
Hi @AndreLuizsgf, I'm an AI assistant for Novu. While a team member reviews this question, I'll see if I can find relevant sources for your question. ----------------------------- While I generate an answer, here are some sources that might be helpful: * Data Migrations * AWS * Run Novu in local machine * Deploy with Docker ----------------------------- Answer It sounds like you are facing challenges with running migrations for Novu specifically around rebuilding packages and modifying migration scripts to execute functions. Here’s how you can address these issues based on the provided documentation: 1. Rebuilding the Package: The need to rebuild the application-generic package suggests there might have been issues with dependencies or the build process. Ensure that all dependencies are correctly installed and that your environment matches the requirements specified by Novu. This usually involves ensuring the correct versions of Node.js and any other critical dependencies. 2. Migration Scripts Not Executing: If certain migrations like encrypt-credentials-migration.ts, add-integration-identifier-migration.ts, and seen-read-support are not executing as expected, it's crucial to verify that they are correctly referenced and that the command you are using to execute them is correctly formatted. According to the Novu documentation, running a migration should follow this structure:
npm run setup:project
cd apps/api
npm run migration -- ./migrations/<MIGRATION_PATH>.ts
npm run setup:project
cd apps/api
npm run migration -- ./migrations/<MIGRATION_PATH>.ts
Ask Inkeep
Ask Inkeep7mo ago
Ensure that the paths and file names are correctly specified when running the migrations (1) . If you continue to experience issues, it may be beneficial to check for any updates or notes in the Novu repository that may address these problems, as migrations can be sensitive to the specific version and setup of your environment. For detailed guidance on running specific migrations and troubleshooting possible issues, you might want to refer directly to the migration documentation provided by Novu . If these steps still do not resolve your issues, it could be helpful to look at the error logs and potentially open an issue in the Novu GitHub repository for more tailored support. ---
Ask Inkeep
Ask Inkeep7mo ago
Got it. Tagging @Support for additional help. Glad I could be helpful. Feel free to create a new thread with any new questions you may have. Got it. Tagging @Support for additional help.
Want results from more Discord servers?
Add your server