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

docs: deployment -> custom env variables, env-cmd example is not working #6995

Closed
VMois opened this issue May 6, 2019 · 3 comments
Closed

Comments

@VMois
Copy link
Contributor

VMois commented May 6, 2019

Is this a bug report?

Incorrect information in docs -> Deployment.

Steps to Reproduce

  1. Go to https://facebook.github.io/create-react-app/docs/deployment#customizing-environment-variables-for-arbitrary-build-environments
  2. Follow the instruction and try to run env-cmd as suggested in docs. You will receive different error like FileNotFound etc. (I am using env-cmd version 9.0.1)

Expected Behavior

After some time, I found a solution. Working example:

"scripts": {
    "build:local": "env-cmd -f ./.env.production.local npm run build",
    "build:production": "env-cmd -f ./.env.production npm run build"
  }

Actual Behavior

In docs you can find something like this:

{
  "scripts": {
    "build:staging": "env-cmd .env.staging npm run build"
  }
}
@iansu
Copy link
Contributor

iansu commented May 6, 2019

It looks like env-cmd has changed since we wrote those docs. Want to send a PR to update them?

@VMois
Copy link
Contributor Author

VMois commented May 7, 2019

Yes, I will do it in the next couple of days.

@VMois
Copy link
Contributor Author

VMois commented May 27, 2019

I will close this issue because PR is already merged. Thanks.

@VMois VMois closed this as completed May 27, 2019
@lock lock bot locked and limited conversation to collaborators Jun 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants