Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MissingEnvVarsError: The following variables were defined in .env.example but are not present in the environment: #9

Open
knav33n opened this issue Oct 4, 2020 · 1 comment

Comments

@knav33n
Copy link

knav33n commented Oct 4, 2020

Thanks for that great course, got to learn quite a lot.
Should we configure these env variables in dokku while deploying?

App container failed to start!!
       /usr/src/app/node_modules/dotenv-safe/index.js:31
                   throw new MissingEnvVarsError(allowEmptyValues, options.path || '.env', example, missing, dotenvResult.error);
                   ^
       MissingEnvVarsError: The following variables were defined in .env.example but are not present in the environment:
         DATABASE_URL
       Make sure to add them to .env or directly to the environment.
       If you expect any of these variables to be empty, you can use the allowEmptyValues option:
       require('dotenv-safe').config({
         allowEmptyValues: true
       });
           at Object.config (/usr/src/app/node_modules/dotenv-safe/index.js:31:19)
           at /usr/src/app/node_modules/dotenv-safe/config.js:9:18
           at Object.<anonymous> (/usr/src/app/node_modules/dotenv-safe/config.js:10:3)
           at Module._compile (internal/modules/cjs/loader.js:1076:30)
           at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
           at Module.load (internal/modules/cjs/loader.js:941:32)
           at Function.Module._load (internal/modules/cjs/loader.js:782:14)
           at Module.require (internal/modules/cjs/loader.js:965:19)
           at require (internal/modules/cjs/helpers.js:88:18)
           at Object.<anonymous> (/usr/src/app/dist/index.js:18:1) {
         missing: [ 'DATABASE_URL' ],
         sample: '.env.example',
         example: '.env.example'
       }
@benawad
Copy link
Owner

benawad commented Oct 4, 2020

DATABASE_URL comes from linking dokku postgres instance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants