-
Notifications
You must be signed in to change notification settings - Fork 95
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
need compatibility with cross-env package #71
Comments
hmm, that is interesting, if you can create a tiny reproducible example repo, even with dummy commands, or even better with a fix PR, I would love to fix this |
I believe I run into this issue. I created an example repo here: https://github.com/petermakowski/start-server-and-test-cross-env-bug Do you think you'll have some time to look into this @bahmutov ? |
Not any time soon, but could you debug this problem? Against latest code?
…Sent from my iPhone
On Nov 1, 2018, at 11:43, Peter Makowski ***@***.***> wrote:
I believe I run into this issue. I created an example repo here: https://github.com/petermakowski/start-server-and-test-cross-env-bug Do you think you'll have some time to look into this @bahmutov ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Issue is because cross-env returns non-zero status code when the process is killed with anything except SIGINT. start-server-and-test uses process.kill() which by default sends SIGTERM. Solution could be to use SIGINT instead, though of course it could be debatable to some whether cross-env should assume non-zero for SIGTERM. That said, I currently I agree with their behavior and think SIGINT should be sent instead. I created a PR to address this #125 |
should be published now as version |
🎉 This issue has been resolved in version 1.7.10 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
@bahmutov thanks for the quick merge and release! ❤️ |
Ran into the same issue with crossenv + a node server that is running. Only thing that helps is a
In my server.js. I have no clue why. It is a big nuxt project. |
Thank you for taking time to open a new issue. Please answer a few questions to help us fix it faster. You can delete text that is irrelevant to the issue.
Is this a bug report or a feature request?
Bug
If this is a bug report, please provide as much info as possible
1.5
mac
no error after exist
error after test finishes and exits.
-Detail:
I am using Jest library as testing package.
If I use cross-env to define environment variables for both test and start-server, then it will throw errors when the Jest test exists.
My current configuration:
"test": "cross-env NODE_ENV=test jest --forceExist",
"test-server": "cross-env NODE_ENV=test ts-node src/index.ts",
"ci": "start-server-and-test test-server http://localhost:4000 test",
the error message when it exists the test is the following:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! typeorm@0.0.1 test-server:
cross-env NODE_ENV=test ts-node src/index.ts
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the typeorm@0.0.1 test-server script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/tanekim/.npm/_logs/2018-07-05T23_57_30_700Z-debug.log
If I remove the keywords cross-env from all lines and then run ci again, then I don't see the error message.
Also, it is a problem with mac, not windows, as I tested.
If this is a new feature request, please describe it below
The text was updated successfully, but these errors were encountered: