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: patch-nx-dep-graph for windows #174

Merged
merged 1 commit into from
May 10, 2021
Merged

fix: patch-nx-dep-graph for windows #174

merged 1 commit into from
May 10, 2021

Conversation

yakirgot
Copy link
Contributor

on windows process.env.INIT_CWD is undefined, which makes the script fails because path.join expects strings

on windows process.env.INIT_CWD is undefined, which makes the script fail because path.join expects strings
@ZachJW34
Copy link
Owner

ZachJW34 commented May 7, 2021

I tested this on my Windows machine and the postinstall worked fine. I see this issue which you might be experiencing, so I installed npm v7.1.1 and tried running npm i and the postinstall failed with the error you are reporting. Upgrading to a newer version of npm fixed it for me. Can you post what version of npm you are using and if upgrading to a newer version fixes this issue?

@yakirgot
Copy link
Contributor Author

yakirgot commented May 7, 2021

My npm version at the time of opening this PR is 7.0.15. I think many developers are bound to a certain node version because of reasons, and even though this is not an issue in newer versions, we should still safe guard against old versions. 7.1.1 is a pretty new version, and I am using the LTS node version (14.x.x) at work which comes with npm 6.x.x.

On a macbook the script actually worked.

@ZachJW34
Copy link
Owner

I tested with a broken version of npm and your PR works. I agree with you, even if it is a small range of npm versions that are affected, this small patch will fix those problems. Thanks for the contribution!!

@ZachJW34 ZachJW34 merged commit 52b5a79 into ZachJW34:master May 10, 2021
@yakirgot yakirgot deleted the fix-patch-nx-dep-graph branch May 10, 2021 07:53
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.

None yet

2 participants