Hello Yarn 2, Goodbye node_modules
11–20 of 160 posts
Re: Hello Yarn 2, Goodbye node_modules
#12Meanwhile, as much as I respect the work of Mael (yarn maintainer) I’ve switched back to npm. Mostly because:
- isaacs (original creator of npm) did some commits lately
- now backed by GitHub
- they introduced workspaces (monorepo support) in npm 7
- it’s still easier to use the standard tooling in dev/ci/prod
- like many, I had issues trying to convert my projects to yarn v2/3
The only thing yarn did I want in npm is an easy way to enforce the npm version across all environments (https://classic.yarnpkg.com/en/docs/cli/policies/).
Re: Hello Yarn 2, Goodbye node_modules
#13I haven't got the build working yet - and not sure it's even achievable - because so many of our explicit deps have implicit dependencies themselves (and some refuse to fix) - but it's been a valuable exercise.
Re: Hello Yarn 2, Goodbye node_modules
#14Why is it that when I look at Yarn releases on GitHub it doesn't show v2?
V2 (now v3 ...) lives at https://github.com/yarnpkg/berry.
No idea why they did it that way. Probably because Yarn 1 is still very actively used, and things would get confusing otherwise.
Re: Hello Yarn 2, Goodbye node_modules
#15So the cost is you add another tool (yarn) to your toolchain and this is better than NPM because your deps are all in one folder and just mapped through a header file instead of being duplicated for every project, am I understanding that right?
For a good while most people were better served by yarn anyway. I don't know exactly the current state of npm, but part of yarn's draw (even prior to the pnp aspect) was having deterministic builds. Even with a package lockfile, npm couldn't do that.
I think if you're careful about what you pull in from npm it's totally fine.
Re: Hello Yarn 2, Goodbye node_modules
#16My company still has issues using yarn, as elastic beanstalk and their node environments only support npm... Does someone know an easy way without using own docker containers to fix that?
Re: Hello Yarn 2, Goodbye node_modules
#17Re: Hello Yarn 2, Goodbye node_modules
#18So the cost is you add another tool (yarn) to your toolchain and this is better than NPM because your deps are all in one folder and just mapped through a header file instead of being duplicated for every project, am I understanding that right?
For a good while most people were better served by yarn anyway. I don't know exactly the current state of npm, but part of yarn's draw (even prior to the pnp aspect) was having deterministic builds. Even with a package lockfile, npm couldn't do that.
NPM now has npm ci (which I think should be the default) for that.
Re: Hello Yarn 2, Goodbye node_modules
#19Wish you the best with this and hope the tide turns on your favor eventually :)
Re: Hello Yarn 2, Goodbye node_modules
#20This also reminds me how much we keep reinventing the wheel on this. I know it's likely infeasible for various reasons but it seems like it would be great to have a language-agnostic package manager that worked more or less like Bundler and can solve these problems once.
(The most obvious downside of that is that – well – what language is it written in, and does it cause you to have to install multiple toolchains. Maybe the solution is some kind of standard spec for how package management should work, and the manifest formats, etc, and then each language ecosystem implements that standard. Or something. IDK.)
Edit: A cool feature of such a system could be installing dependencies from multiple language ecosystems via one manifest file.