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

[Bug][Case Study] General feedback and bugs #962

Closed
guidsdo opened this issue Feb 17, 2020 · 4 comments
Closed

[Bug][Case Study] General feedback and bugs #962

guidsdo opened this issue Feb 17, 2020 · 4 comments
Assignees
Labels
case study Package compatibility report

Comments

@guidsdo
Copy link

guidsdo commented Feb 17, 2020

Dear Yarn people,

First of all; thank you for all the effort! I love that you guys have a vision of where the whole node package management thing should go to.

After upgrading, I ran into some problems:

  • Unclear webpack and vscode solution. Googling the fixes took more effort than expected.
  • What files should I ignore in my project? I now have the .pnp.js, .yarnrc.yml, .vscode/pnpify/... files and I don't know which to ignore or keep.
  • Consider not using javascript to document whatever is meant to be in .pnp.js since it makes my IDE (vscode) really slow when diffing.
  • The whole setup is way too complicated. I get that you want to improve and be innovative, but this is way worse than a folder called node_modules that contains all the modules and a simple lock file.
  • After doing the pnpify thing on Windows, some of my filepaths in .yarnrc.yml are only compatible with windows because they use \ in the paths.
  • I can't jump to definition for Typescript files because I get this:
Unable to open 'index.d.ts': 
Unable to read file '/Users/XXX/dev/workflow/.yarn/cache/@types-styled-components-npm-4.4.3-dd2b834be1-2.zip/node_modules/@types/styled-components/ts3.7/index.d.ts' 
(Unknown (FileSystemError): 
Error:
ENOTDIR: not a directory, stat '/Users/XXX/dev/workflow/.yarn/cache/@types-styled-components-npm-4.4.3-dd2b834be1-2.zip/node_modules/@types/styled-components/ts3.7/index.d.ts').

Honestly; I don't really care about how my packages are managed as long as I have some form of lock files and installing and linking them doesn't take too long.

My conclusion is; going back to yarn 1.whatever or just installing npm. Again; I appreciate that we're going into a new direction but my experience this far is really really bad.

@guidsdo guidsdo added the case study Package compatibility report label Feb 17, 2020
@paul-soporan
Copy link
Member

paul-soporan commented Feb 17, 2020

Solutions to some of your problems:

# Mark .pnp.js as a generated binary to prevent git from trying to merge it
/.pnp.js binary linguist-generated

# Hide .yarn from GitHub's language statistics
/.yarn/** linguist-vendored
  • You can just add the .pnp.js file and the .yarn/cache folder to .gitignore if you don't need Zero-Installs.

I'll investigate the .yarnrc.yml issue.

There are a few more Yarn 2 tips that you can find on a Reddit comment that I left yesterday: https://www.reddit.com/r/javascript/comments/f4r213/askjs_is_someone_using_yarn_v2_in_business/fht7emv?utm_source=share&utm_medium=web2x
If you need help you can join the Yarn Discord Server😃: https://discord.gg/yarnpkg

@guidsdo
Copy link
Author

guidsdo commented Feb 18, 2020

Thank you for your quick response :-)

My expectations were incorrect since I expected there to be less effort for me to put in and for my situation it's easier to wait a bit. I'll try migrating again in a few months when there is a broader support for it.

I think that the general feedback you can take from me, is that I have trouble with understanding all the new concepts, the reasons for them, and converting my existing projects to it when coming from a fairly simple situation.
It's like when you're used to using Express for your server and wanting to go to NestJS. So many new concepts (with a good reason for sure) that you need to understand to fully use it, but in the end you just rather use Express because it takes less time to get everything working and you don't have to put any effort in it.

@Halkcyon
Copy link

Halkcyon commented Feb 22, 2020

@paul-soporan I disagree with the confusion expressed in this issue, but I will chime in as another Windows user: the .yarnrc.yml is generating with a fully-qualified Windows path when using yarn set berry in a project from the system yarn 1.x. Using a Linux relative path here works, but is not the default presently (using 2.0.0-rc.29).

Expected: yarnPath: .yarn/releases/yarn-berry.js
Actual: yarnPath: "C:\\Users\\${name}\\${path_to_repo}\\.yarn\\releases\\yarn-berry.js"

@paul-soporan
Copy link
Member

@TheIncorrigible1 The .yarnrc.yml issue is a duplicate of #921 and is actually a v1 issue.

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

No branches or pull requests

4 participants