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

Add 'cross-env' to dependencies #241

Merged
merged 1 commit into from Jul 6, 2021

Conversation

fluturecode
Copy link
Contributor

@fluturecode fluturecode commented Jul 2, 2021

Changes

  1. Moved cross-env to a dependency.

Purpose

This will allow [yarn start] to run correctly with no errors.

Learning

Please visit the comments from Issue #233 .

Testing

  1. Pull in the changes to your local copy of this branch.
  2. Run [yarn start] and make sure there are no errors.

Screenshot

Screen Shot 2021-07-06 at 10 37 15 AM

References #233

@fluturecode fluturecode self-assigned this Jul 2, 2021
@fluturecode fluturecode added the bug Something isn't working label Jul 2, 2021
@fluturecode fluturecode marked this pull request as ready for review July 6, 2021 14:38
Copy link
Contributor

@michaelachrisco michaelachrisco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent, thanks for fixing that! We really should be adding any dependency that is necessary for running the project into the main dependencies.

@fluturecode fluturecode requested a review from a team July 6, 2021 16:43
Copy link
Contributor

@AramayisO AramayisO left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we need to make cross-env a dependency since it is only used for development. Setting environment variables with cross-env can only work when you run the app using the development server. Once you run yarn build and create a production build, the app is turned into static files and there are no more "environment variables" - all variables get hard-coded in the source code. I think the problem in issue #233 is related to something else. I had that problem once, but then pulled down a clean branch and ran yarn install && yarn start and the app worked without problems.

@fluturecode
Copy link
Contributor Author

I'm not sure we need to make cross-env a dependency since it is only used for development. Setting environment variables with cross-env can only work when you run the app using the development server. Once you run yarn build and create a production build, the app is turned into static files and there are no more "environment variables" - all variables get hard-coded in the source code. I think the problem in issue #233 is related to something else. I had that problem once, but then pulled down a clean branch and ran yarn install && yarn start and the app worked without problems.

The issue that came up #233 was related to something else, but that issue lead to this PR as well. Michael pulled down and ran the repo and had issues, which based on repo he linked, is why I made the adjustment here. Did you get a chance to look at what he linked in that issue?

@AramayisO
Copy link
Contributor

I'm not sure we need to make cross-env a dependency since it is only used for development. Setting environment variables with cross-env can only work when you run the app using the development server. Once you run yarn build and create a production build, the app is turned into static files and there are no more "environment variables" - all variables get hard-coded in the source code. I think the problem in issue #233 is related to something else. I had that problem once, but then pulled down a clean branch and ran yarn install && yarn start and the app worked without problems.

The issue that came up #233 was related to something else, but that issue lead to this PR as well. Michael pulled down and ran the repo and had issues, which based on repo he linked, is why I made the adjustment here. Did you get a chance to look at what he linked in that issue?

Yes, I looked through the thread linked in #233. It looks like that is the intended behavior and that yarn install comes with --production=false flag to install dev dependencies in production yarnpkg/yarn#2739 (comment).

@AramayisO AramayisO self-requested a review July 6, 2021 22:49
Copy link
Contributor

@AramayisO AramayisO left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gonna go ahead and approve to unblock.

@fluturecode
Copy link
Contributor Author

Gonna go ahead and approve to unblock.

Ok thanks. We can update in the future, and look into this a little more for sure.

@fluturecode fluturecode merged commit 757d90f into development Jul 6, 2021
@fluturecode fluturecode deleted the ee-233-yarn-install-dependencies branch July 6, 2021 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants