Skip to content

NX monorepo support | You set DOTENV_KEY but you are missing a .env.vault file at .local.env.vault. Did you forget to build it? #335

Open
@Husamui

Description

@Husamui

we using NX monorepo for our projects.

Steps:

  1. We placed the .env.vault and env.keys files at the root directory of the nx monorepo.
  2. Run export DOTENV_KEY='dotenv:xxxxx in the command line before serving the app.
  3. calling require('dotenv').config(); in rootDirectory/apps/app_name/src/main.ts.

we got the following warnings in the console when serving the app even though the app server correctly and include the env variables (I believe because .env loading the env variables from step 2)

You set DOTENV_KEY but you are missing a .env.vault file at .local.env.vault. Did you forget to build it?
[ NX] [[email protected]][INFO] Loading env from encrypted .env.vault
[ NX] [[email protected]][WARN] You set DOTENV_KEY but you are missing a .env.vault file at .local.env.vault. Did you forget to build it?
[ NX] [[email protected]][WARN] You set DOTENV_KEY but you are missing a .env.vault file at .env.local.vault. Did you forget to build it?
[ NX] [[email protected]][WARN] You set DOTENV_KEY but you are missing a .env.vault file at apps/api/.env.serve.development.vault. Did you forget to build it?
[ NX] [[email protected]][WARN] You set DOTENV_KEY but you are missing a .env.vault file at apps/api/.env.development.vault. Did you forget to build it?
[ NX] [[email protected]][WARN] You set DOTENV_KEY but you are missing a .env.vault file at apps/api/.serve.development.env.vault. Did you forget to build it?
[ NX] [[email protected]][WARN] You set DOTENV_KEY but you are missing a .env.vault file at apps/api/.development.env.vault. Did you forget to build it?
[ NX] [[email protected]][WARN] You set DOTENV_KEY but you are missing a .env.vault file at apps/api/.env.serve.vault. Did you forget to build it?
[ NX] [[email protected]][WARN] You set DOTENV_KEY but you are missing a .env.vault file at apps/api/.serve.env.vault. Did you forget to build it?
[ NX] [[email protected]][WARN] You set DOTENV_KEY but you are missing a .env.vault file at apps/api/.env.local.vault. Did you forget to build it?
[ NX] [[email protected]][WARN] You set DOTENV_KEY but you are missing a .env.vault file at apps/api/.local.env.vault. Did you forget to build it?
[ NX] [[email protected]][INFO] Loading env from encrypted .env.vault
[ NX] [[email protected]][WARN] You set DOTENV_KEY but you are missing a .env.vault file at .env.serve.development.vault. Did you forget to build it?
[ NX] [[email protected]][WARN] You set DOTENV_KEY but you are missing a .env.vault file at .env.development.vault. Did you forget to build it?
[ NX] [[email protected]][WARN] You set DOTENV_KEY but you are missing a .env.vault file at .serve.development.env.vault. Did you forget to build it?
[ NX] [[email protected]][WARN] You set DOTENV_KEY but you are missing a .env.vault file at .development.env.vault. Did you forget to build it?
[ NX] [[email protected]][WARN] You set DOTENV_KEY but you are missing a .env.vault file at .env.serve.vault. Did you forget to build it?
[ NX] [[email protected]][WARN] You set DOTENV_KEY but you are missing a .env.vault file at .serve.env.vault. Did you forget to build it?
[ NX] [[email protected]][WARN] You set DOTENV_KEY but you are missing a .env.vault file at .local.env.vault. Did you forget to build it?
[ NX] [[email protected]][WARN] You set DOTENV_KEY but you are missing a .env.vault file at .env.local.vault. Did you forget to build it?
[ NX] [[email protected]][INFO] Loading env from encrypted .env.vault

any suggests?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions