Live data from Hacker News

To Yarn and Back to Npm Again

mixmax.com

11–20 of 54 posts

Re: To Yarn and Back to Npm Again

#11

> Yarn often produces yarn.lock files that are invalid when you run add, remove, or update. This has never happened to us with heavy daily usage. It's one of the things that remains reliable about Yarn. Would appreciate more details on what exactly happened.

Our experience has been yarn is fast and reliable.

Re: To Yarn and Back to Npm Again

#12
I love npm, but there's some bug that keeps looming. I have a git based dependency (basically a dependency that's attached to https://user:password@gitlab.com/xxxxxx#branch)

I don't know why, but any time I install something specific in this project:

npm i -D @types/tacos

(for example)

The last line of npm says this: added 9 packages and removed 15 packages in 9.69s

Those 15 removed packages? Not dependency conflicts, no, thats the git dependency and all of its sub-dependencies.

So my workflow is now:

npm i --save

npm i

Re: To Yarn and Back to Npm Again

#14

> Yarn often produces yarn.lock files that are invalid when you run add, remove, or update. This has never happened to us with heavy daily usage. It's one of the things that remains reliable about Yarn. Would appreciate more details on what exactly happened.

Here's an issue I've experienced with using upgrade: https://github.com/yarnpkg/yarn/issues/5749

Re: To Yarn and Back to Npm Again

#15
post #12

I love npm, but there's some bug that keeps looming. I have a git based dependency (basically a dependency that's attached to https://user:password@gitlab.com/xxxxxx#branch ) I don't know why, but any time I install something specific in this project: npm i -D @types/tacos (for example) The last line of npm says this: added 9 packages and removed 15 packages in 9.69s Those 15 removed packages? Not dependency conflict…

npm fixed a lot of the git dependency issues with 5.7.1. Have you tried updating?

Re: To Yarn and Back to Npm Again

#16
post #12

I love npm, but there's some bug that keeps looming. I have a git based dependency (basically a dependency that's attached to https://user:password@gitlab.com/xxxxxx#branch ) I don't know why, but any time I install something specific in this project: npm i -D @types/tacos (for example) The last line of npm says this: added 9 packages and removed 15 packages in 9.69s Those 15 removed packages? Not dependency conflict…

I had this issue as well. I found an outstanding issue [0] on github. Running npm install -g npm will update your npm to the absolute latest version, which resolves this erroneous removal.

[0] : https://github.com/npm/npm/issues/17379

Re: To Yarn and Back to Npm Again

#17
Just the way npm handled my bug reports made me decide never use npm cli again.

The registry is something everyone has to use because npm has a monopoly. It's not open source and is making money for a for profit company. I'm very disappointed to see Node.js is still shipping this anti-foss OSS with its executables :(

Re: To Yarn and Back to Npm Again

#18
post #12

I love npm, but there's some bug that keeps looming. I have a git based dependency (basically a dependency that's attached to https://user:password@gitlab.com/xxxxxx#branch ) I don't know why, but any time I install something specific in this project: npm i -D @types/tacos (for example) The last line of npm says this: added 9 packages and removed 15 packages in 9.69s Those 15 removed packages? Not dependency conflict…

I worked with @iarna over at npm to get a very similar bug fixed - https://github.com/npm/npm/pull/20198. I'm pretty sure this is just a special case of that bug - if you're not on npm 6.1.0 it might be fixed there. Otherwise I'd encourage you to comment in on that PR / the attached issue with a flow to reproduce.

Re: To Yarn and Back to Npm Again

#19
I've been enjoying pnpm as my node package manager for about a year now.

" rel="nofollow">https://github.com/pnpm/pnpm>

It centrally downloads all of the modules and then "symlinks" them into your `node_modules` folder.

This is nice because one, it uses less disk space, two, if you've already downloaded a package at a particular version it links it out of the local repo.

Also uses shrinkwrap to handle package locking.

Re: To Yarn and Back to Npm Again

#20
post #11

> Yarn often produces yarn.lock files that are invalid when you run add, remove, or update. This has never happened to us with heavy daily usage. It's one of the things that remains reliable about Yarn. Would appreciate more details on what exactly happened.

Our experience has been yarn is fast and reliable.

Hmm, `yarn add` reliably takes a few years in my environment (WSL). Maybe the environment is the problem, though.
Post reply on HN