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

Fix usage of cross-env in examples #864

Merged
merged 1 commit into from
Feb 22, 2017

Conversation

ericf
Copy link
Collaborator

@ericf ericf commented Feb 22, 2017

Fixes #855

@ericf ericf merged commit b8495fd into formatjs:master Feb 22, 2017
@ericf ericf deleted the fix-examples-cross-env branch February 22, 2017 21:32
@bartvanandel
Copy link

Unfortunately this change results in breakage on Windows. The whole purpose of cross-env is to make things run across different environments. Adding a path to an executable (/ on unix-like systems, \ on Windows) basically undoes this advantage as the command no longer runs at all:

D:\src\react-intl\examples\async>npm run clean

> react-intl-example-async@1.0.0 clean D:\src\bart\github\react-intl\examples\async
> ../../node_modules/.bin/cross-env ../../node_modules/.bin/rimraf build

'..' is not recognized as an internal or external command,
operable program or batch file.

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "clean"
[... etc]

BTW I'm not sure what the proper fix would be here, don't shoot the messenger please! I suppose adding cross-env (and maybe friends) to the package.json file inside the examples would help, but I guess you don't want the examples to behave like actual packages and just use the package.json file for the convenience of being able to run scripts?

@JeremieLeblanc
Copy link

Will the examples ever be fixed on windows?

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.

can't run translations example
3 participants