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

Update package.json #35

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

dane-stevens
Copy link

Moved cross-env to dependencies

Moved cross-env to dependencies
@brookslybrand
Copy link
Contributor

Can you clarify why this needs to be a dependency? It may be obvious, I think I'm just missing it

Also, if this needs to be done, will you do it in all templates that use cross-env (I think the JS one is the only other one)

@dane-stevens
Copy link
Author

Because of the start script in package.json "start": "cross-env NODE_ENV=production react-router-serve ./build/server/index.js"

When I tried to run the start command in my production environment it failed because of "cross-env" in the start script.

Not sure if maybe the start script should just not have the cross-env NODE_ENV=production because the build command already has it?

@rvanbaalen
Copy link

Another option would be to use npx like npx cross-env NODE_ENV=... etc

@sflahave
Copy link

The Dockerfiles for the templates that use cross-env in the start script don't work as-is. We either have to remove cross-env from them or move cross-env to the dependencies section. Or as @rvanbaalen suggested, use npx cross-env in the start script. (But if we do that, shouldn't we do that everywhere, and remove cross-env as a listed dependency entirely?)

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 this pull request may close these issues.

4 participants