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

Plug'n'Play doesn't support Windows paths #6402

Closed
AnyByte opened this issue Sep 19, 2018 · 3 comments · Fixed by #6447
Closed

Plug'n'Play doesn't support Windows paths #6402

AnyByte opened this issue Sep 19, 2018 · 3 comments · Fixed by #6447
Assignees
Labels

Comments

@AnyByte
Copy link

AnyByte commented Sep 19, 2018

Do you want to request a feature or report a bug?
I want to report a bug.

What is the current behavior?
When using yarn install with C:\Users\Username\Desktop\yarn\bin added to path variable, where C:\Users\Username\Desktop\yarn is checked out with git clone github.com/yarnpkg/yarn.git --branch yarn-pnp and "installConfig": {"pnp": true} is appended to project's package.json or yarn install --pnp is executed in project's folder it creates node_modules folder and doesnt create .pnp.js file.

These methods were tested on pnp-sample-app as well. And all required packages were present in yarn cache and checked with yarn cache list.

If the current behavior is a bug, please provide the steps to reproduce.
yarn install --pnp
or
Add "installConfig": {"pnp": true} in package.json and run yarn or yarn install in project's root directory.

What is the expected behavior?
No node_modules folder should be created and .pnp.js shold be created inside the root of the project.

Please mention your node.js, yarn and operating system version.
Node v8.11.3
Yarn 1.11.0-0
Windows 10 1803

@ghost ghost assigned imsnif Sep 19, 2018
@ghost ghost added the triaged label Sep 19, 2018
@strothj
Copy link

strothj commented Sep 19, 2018

@NYABIT PnP is currently not supported on Windows (it disables after platform check). Seems to work in Subsystem for Linux just fine though.

@arcanis
Copy link
Member

arcanis commented Sep 20, 2018

Yep, exactly - it shouldn't be too hard to add support for it, I just didn't have enough bandwidth to think about the edge cases related to how the Windows paths are encoded.

If someone from the community was to make a PR to add support for it, it would be really impactful and would certainly be advertised by the Yarnpkg twitter account 🙂

@arcanis arcanis changed the title Plug'n'play not working Plug'n'Play doesn't support Windows paths Sep 20, 2018
@jdalton
Copy link
Contributor

jdalton commented Sep 25, 2018

For reference the esm loader uses a normalize helper for the relative paths it stores in metadata. Which should keep it portable across-platforms (Windows and other).

Update:

Opened PR #6447 to start working toward fixing this.

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

Successfully merging a pull request may close this issue.

5 participants