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

Error when trying to migrate with usage of "dotenv-expand" #873

Open
JeromeBu opened this issue Feb 2, 2022 · 1 comment
Open

Error when trying to migrate with usage of "dotenv-expand" #873

JeromeBu opened this issue Feb 2, 2022 · 1 comment

Comments

@JeromeBu
Copy link

JeromeBu commented Feb 2, 2022

I have had an error when trying to use this lib with dotenv-expand.

 ts-node node_modules/.bin/node-pg-migrate -j ts "up"

TypeError: dotenvExpand is not a function
    at Object.<anonymous> (/Users/........../node_modules/node-pg-migrate/bin/node-pg-migrate:234:5)

I think I spotted a wrong usage of dotenv-expend ( in the lib).

const dotenvExpand = tryRequire('dotenv-expand')
  if (dotenvExpand) {
    dotenvExpand(myEnv) // this should be : dotenvExpand.expand(myEnv)
  }
@tzur
Copy link

tzur commented Feb 14, 2022

Having the same error (happen to me after i've added nestjs/config which dependent on dotenv & dotenv-expand)

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

Successfully merging a pull request may close this issue.

2 participants