[GH-ISSUE #523] [DOC-361] Use dotenv for Prisma package scripts #138

Closed
opened 2026-02-26 18:45:31 +03:00 by kerem · 5 comments
Owner

Originally created by @catalinpit on GitHub (Oct 4, 2023).
Original GitHub issue: https://github.com/documenso/documenso/issues/523

The app should use the "dotenv" package to load the environment variables.

From SyncLinear.com | DOC-361

Originally created by @catalinpit on GitHub (Oct 4, 2023). Original GitHub issue: https://github.com/documenso/documenso/issues/523 The app should use the "dotenv" package to load the environment variables. <sub>From [SyncLinear.com](https://synclinear.com) | [DOC-361](https://linear.app/documenso/issue/DOC-361/use-dotenv-for-package-scripts)</sub>
kerem 2026-02-26 18:45:31 +03:00
  • closed this issue
  • added the
    community
    label
Author
Owner

@adityadeshlahre commented on GitHub (Oct 4, 2023):

i would like to work on this improvement ! 😄

<!-- gh-comment-id:1746586664 --> @adityadeshlahre commented on GitHub (Oct 4, 2023): i would like to work on this improvement ! :smile:
Author
Owner

@catalinpit commented on GitHub (Oct 4, 2023):

@adityadeshlahre sure, feel free. thanks!

<!-- gh-comment-id:1746595625 --> @catalinpit commented on GitHub (Oct 4, 2023): @adityadeshlahre sure, feel free. thanks!
Author
Owner

@anjy7 commented on GitHub (Oct 4, 2023):

Hey @adityadeshlahre , I ran into this issue and had made the changes while working on the gitpod setup in my local setup. To save your time - install dotenv package and add "require('dotenv').config();" to helper.ts and schema.prisma under packages/prisma

<!-- gh-comment-id:1746604502 --> @anjy7 commented on GitHub (Oct 4, 2023): Hey @adityadeshlahre , I ran into this issue and had made the changes while working on the gitpod setup in my local setup. To save your time - install dotenv package and add "require('dotenv').config();" to helper.ts and schema.prisma under packages/prisma
Author
Owner

@adityadeshlahre commented on GitHub (Oct 4, 2023):

Thank You @anjy7 sure will consider your changes : )

<!-- gh-comment-id:1746607401 --> @adityadeshlahre commented on GitHub (Oct 4, 2023): Thank You @anjy7 sure will consider your changes : )
Author
Owner

@adityadeshlahre commented on GitHub (Oct 4, 2023):

UPDATE
image

i m able to load the .env from root level using package.json ! 😄

but npm run prisma:migrate-dev -w @documenso/prisma is giving error

I am trying to figure it out !
Thank You

Edit :
Is this is correct out of command npm run prisma:migrate-dev -w @documenso/prisma

image

Edit2:
Its working fine for fresh docker containers

image

accidentally i pushed it in same PR #516

[https://github.com/documenso/documenso/pull/516/commits/68458b50d2ab76173319286f8fb810613d24f221]

This is commit which fixed this issue !
Thank You 😄

<!-- gh-comment-id:1746960007 --> @adityadeshlahre commented on GitHub (Oct 4, 2023): **UPDATE** ![image](https://github.com/documenso/documenso/assets/132184385/e9053da1-44f3-49a0-b880-52ac62c69e8d) i m able to load the .env from root level using package.json ! :smile: but **`npm run prisma:migrate-dev -w @documenso/prisma`** is giving error I am trying to figure it out ! Thank You **Edit :** Is this is correct out of command **`npm run prisma:migrate-dev -w @documenso/prisma`** ![image](https://github.com/documenso/documenso/assets/132184385/325c851a-5026-4317-bba2-2dc3feb667bf) **Edit2:** Its working fine for fresh docker containers ![image](https://github.com/documenso/documenso/assets/132184385/484b7391-b1cc-46a9-85d0-9373f7e74df0) accidentally i pushed it in same PR #516 [https://github.com/documenso/documenso/pull/516/commits/68458b50d2ab76173319286f8fb810613d24f221] This is commit which fixed this issue ! Thank You :smile:
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#138
No description provided.