P
Prismaā€¢7d ago
mdcarter

Delete annoying warning in production

This warning pop-up in my log all the time : prisma:warn In production, we recommend using prisma generate --no-engine (See: prisma generate --help) I'm using the "normal" client and also the "edge" client, depending on my endpoint, so I can't use the --no-engine option. Is there a way to make this warning finally go away ? Thanks !
4 Replies
Prisma AI Help
Prisma AI Helpā€¢7d ago
You selected the bot's instantaneous insights. Let me compile your answer right away! Based on the knowledge sources provided, I can offer a solution to your issue with the annoying warning message in production. There are a couple of ways to address this: 1. Use the --no-hints flag: As of a recent update, Prisma has introduced a --no-hints flag that can be used with the prisma generate command to suppress these types of informational messages. You can use it like this:
prisma generate --no-hints

prisma generate --no-hints

This option is mentioned in the Github Issue #22513. 2. Use the PRISMA_DISABLE_WARNINGS environment variable: If you prefer an environment variable approach, you can set PRISMA_DISABLE_WARNINGS to a truthy value. This will disable all CLI warnings generated by logger.warn, including the one you're seeing. This is documented in the Prisma docs on environment variables. You can choose whichever method is more convenient for your setup. The --no-hints flag is more specific to suppressing informational messages, while PRISMA_DISABLE_WARNINGS will suppress all warnings, which might be broader than what you need. Remember that while these methods will suppress the warning, it's always a good idea to understand why the warning is there and ensure that your production setup is optimized according to Prisma's recommendations when possible. šŸ¤” Alright, thanks for letting us know that there's still some help needed. A team member will reply to you shortly. In the meantime, please let us know any additional info, questions, or which parts of the answer may need clarification.
mdcarter
mdcarterOPā€¢7d ago
Neither of these solutions work sadly (I tested them)
Nurul
Nurulā€¢7d ago
Can you try running something like this:
PRISMA_DISABLE_WARNINGS=1 prisma generate
PRISMA_DISABLE_WARNINGS=1 prisma generate
mdcarter
mdcarterOPā€¢6d ago
Yeah generate does not give me any issues, it's the client
āœ“ Starting...
āœ“ Compiled in 555ms
āœ“ Ready in 1356ms
prisma:warn In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)
ā—‹ Compiling /authenticate ...
āœ“ Compiled /authenticate in 1232ms
prisma:warn In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)
POST /authenticate 200 in 2033ms
POST /authenticate 200 in 69ms
āœ“ Starting...
āœ“ Compiled in 555ms
āœ“ Ready in 1356ms
prisma:warn In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)
ā—‹ Compiling /authenticate ...
āœ“ Compiled /authenticate in 1232ms
prisma:warn In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)
POST /authenticate 200 in 2033ms
POST /authenticate 200 in 69ms
My script for generate which is run before starting my app :
"db:generate": "PRISMA_DISABLE_WARNINGS=1 prisma generate --sql --no-hints",
"db:generate": "PRISMA_DISABLE_WARNINGS=1 prisma generate --sql --no-hints",
Any ideas for this ? šŸ™‚

Did you find this page helpful?