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

[Feature request] Support yarn berry pnp #1595

Closed
danieltroger opened this issue Nov 18, 2021 · 2 comments
Closed

[Feature request] Support yarn berry pnp #1595

danieltroger opened this issue Nov 18, 2021 · 2 comments
Labels

Comments

@danieltroger
Copy link

There's a new version of yarn: https://github.com/yarnpkg/berry
And it completely gets rid of node_modules, the dependencies are instead in zip files in.yarn/cache.

Right now that makes typescript not find any dependencies and say things like Cannot find module 'solid-js' or its corresponding type declarations..

It would be great if you could add support somehow.

This is the page describing how to use it with vscode: https://next.yarnpkg.com/getting-started/editor-sdks

It appears to wrap pnpify around tsserver which then emulates a node_modules folder or something.
Through my attempts to get vscode to use it, atom has also started using it:

USER               PID  %CPU %MEM      VSZ    RSS   TT  STAT STARTED      TIME COMMAND
daniel           37279   0.0  0.9 20959556 300720   ??  S     7:52PM   0:08.84 /Applications/Atom.app/Contents/Frameworks/Atom Helper (Renderer).app/Contents/MacOS/Atom Helper (Renderer) --no-deprecation [project_dir]/.yarn/sdks/typescript/lib/tsserver.js --locale en

But it doesn't work in vscode nor in atom :(
Since I don't want to start using vscode because it sucks it would be great if you could make it work with atom :)

@danieltroger
Copy link
Author

So it turns out the editor integrations are all broken because of a typescript upgrade, see: yarnpkg/berry#3722

I downgraded typescript and now the imports and type declarations magically work with pnp in atom!

BUT, I can't "go to definition" because that opens zip:, so atom would need some kind of zip fs and I guess nobody wants to make that :(

@github-actions
Copy link

This issue has been marked as stale because it did not have any activity for the last 90 days or more. Remove the stale label or comment or this will be closed in 14 days

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

No branches or pull requests

1 participant