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

Loading environment variables when no environment.XXX.ts present #33

Open
timmyomahony opened this issue Jul 3, 2018 · 0 comments
Open

Comments

@timmyomahony
Copy link

timmyomahony commented Jul 3, 2018

The approach in this repo works fine when building an app from my local machine, when I have an src/environments/environment.ts file.

In a CI environment though (Circle CI for example), there is no src/environments/environment.ts file as they are not committed to my repo. Instead, all environment variables are configured in the CircleCI interface and passed into the build container as OS environment variables.

When I try to build my app on the CI server instance:

ionic build --prod

I get an error:

Cannot find module '@app/env'.

  1. Does this script load existing environment variables into the ENV object?
  2. Can it work when there is no environment.ts present?
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

1 participant