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

improvement on issue55: TZ is not recognized as a command or cmdlet in Powershell context on Windows system #103

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

SafeWinter
Copy link

Issue description:
When running command npm run test on my computer (Win10), the testing process aborted due to the unrecognized 'TZ' argument (see the attachment file)

Solution:
Add cross-env as a dev-dependency would solve this incompatibility issue. After its installation, the original 'test' script need to be updated like this:

{
    // ...
    "scripts": {
        "test": "cross-env TZ=America/Los_Angeles mocha 'test/**/*-test.js' && eslint src test",
    // ...
}

Then rerun the test, everything get back to normal.
improvement_issue55

…in Powershell environment on Windows system.

Add dev-dependency cross-env and update the 'test' script to solve this incompatibility issue.
@SafeWinter
Copy link
Author

Adding cross-env by npm i cross-env -D and rerunning npm run test, all tests passed as expected:

All tests passed with the help of 'cross-env' module


Original issue: see #55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant