Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Windows: Add preliminary WSL support for npm and npx #253

Closed
wants to merge 7 commits into from

Conversation

infinnie
Copy link
Contributor

@infinnie infinnie commented Sep 20, 2019

This pull request would make it possible to run npm and npx installed with Node on Windows within Windows Subsystem for Linux.

It is required, however, that the end of line characters of npm and npx be \n for the fix to take effect, which might be worth a separate issue or pull request.

This commit would make it possible to run `npm` installed on Windows within Windows Subsystem for Linux.

It is required, however, that the end of line characters of `npm` and `npx` be `\n` for the fix to take effect.
This commit would make it possible to run `npx` installed on Windows within Windows Subsystem for Linux.

It is required, however, that the end of line characters of `npm` and `npx` be `\n` for the fix to take effect.
@infinnie infinnie requested a review from a team as a code owner September 20, 2019 05:56
@infinnie
Copy link
Contributor Author

forwarded from nodejs/node#29627

Run the corresponding command prompt when Node for Windows is executed within WSL.
bin/npx Outdated Show resolved Hide resolved
bin/npm Show resolved Hide resolved
bin/npm Outdated Show resolved Hide resolved
Copy link
Contributor

@isaacs isaacs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor nits, but otherwise no objection to this.

@isaacs
Copy link
Contributor

isaacs commented Sep 20, 2019

It is required, however, that the end of line characters of npm and npx be \n for the fix to take effect, which might be worth a separate issue or pull request.

I think it's fine to put them in this PR, if you wanna add a commit for that.

@infinnie
Copy link
Contributor Author

I think it's fine to put them in this PR, if you wanna add a commit for that.

But how to?

@infinnie
Copy link
Contributor Author

infinnie commented Sep 21, 2019

Also having opened Windows files in WSL without terminating the WSL process seems to write lock the files on the host machine, which might limit the use of this feature. But it might be of some use after all, say running a development server using the Windows executable within WSL.

@mikemimik mikemimik added semver:minor new backwards-compatible feature needs-discussion labels Sep 24, 2019
@claudiahdz claudiahdz added semver:patch semver patch level for changes Release 6.x work is associated with a specific npm 6 release and removed semver:minor new backwards-compatible feature labels Nov 12, 2019
claudiahdz pushed a commit that referenced this pull request Nov 13, 2019
This commit would make it possible to run `npm` installed on Windows within Windows Subsystem for Linux.

It is required, however, that the end of line characters of `npm` and `npx` be `\n` for the fix to take effect.

PR-URL: #253
Credit: @infinnie
Close: #253
Reviewed-by: @claudiahdz
claudiahdz pushed a commit that referenced this pull request Nov 13, 2019
This commit would make it possible to run `npm` installed on Windows within Windows Subsystem for Linux.

It is required, however, that the end of line characters of `npm` and `npx` be `\n` for the fix to take effect.

PR-URL: #253
Credit: @infinnie
Close: #253
Reviewed-by: @claudiahdz
claudiahdz pushed a commit that referenced this pull request Nov 13, 2019
This commit would make it possible to run `npm` installed on Windows within Windows Subsystem for Linux.

It is required, however, that the end of line characters of `npm` and `npx` be `\n` for the fix to take effect.

PR-URL: #253
Credit: @infinnie
Close: #253
Reviewed-by: @claudiahdz
claudiahdz pushed a commit that referenced this pull request Nov 13, 2019
This commit would make it possible to run `npm` installed on Windows within Windows Subsystem for Linux.

It is required, however, that the end of line characters of `npm` and `npx` be `\n` for the fix to take effect.

PR-URL: #253
Credit: @infinnie
Close: #253
Reviewed-by: @claudiahdz
claudiahdz pushed a commit that referenced this pull request Nov 13, 2019
This commit would make it possible to run `npm` installed on Windows within Windows Subsystem for Linux.

It is required, however, that the end of line characters of `npm` and `npx` be `\n` for the fix to take effect.

PR-URL: #253
Credit: @infinnie
Close: #253
Reviewed-by: @claudiahdz
@claudiahdz claudiahdz mentioned this pull request Nov 18, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Release 6.x work is associated with a specific npm 6 release semver:patch semver patch level for changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants