website icon indicating copy to clipboard operation
website copied to clipboard

Update to lang/en/docs/migrating-from-npm.md

Open dotnetCarpenter opened this issue 5 years ago • 6 comments

rm -rf node_modules && npm install is the same as doing npm ci.

https://docs.npmjs.com/cli/ci

dotnetCarpenter avatar Apr 24 '19 15:04 dotnetCarpenter

Deploy preview for yarnpkg ready!

Built with commit dd6c177573303533cdc9cf63632d1fa1962f6302

https://deploy-preview-947--yarnpkg.netlify.com

DanBuild avatar Apr 24 '19 15:04 DanBuild

@DanBuild relevant page is: https://deploy-preview-947--yarnpkg.netlify.com/en/docs/migrating-from-npm#toc-cli-commands-comparison

dotnetCarpenter avatar Apr 24 '19 19:04 dotnetCarpenter

What about leaving it as two lines?

Haroenv avatar Apr 24 '19 21:04 Haroenv

With package-lock.json it’s more equivalent to just “yarn” though

Haroenv avatar Apr 24 '19 21:04 Haroenv

@Haroenv I'm sorry, maybe I don't fully understand what yarn upgrade do.

To be clear, npm ci will:

  1. nuke the node_modules folder - same as rm -rf node_modules
  2. install exact versions as described in package-lock.json.

If I understand you correctly, then yarn is the same as npm ci and yarn upgrade is the same as npm install.

dotnetCarpenter avatar Apr 25 '19 09:04 dotnetCarpenter

Upgrade would be the same as removing the lock file on npm and running npm install again yes, this situation changed since Yarn was first released

Haroenv avatar Apr 25 '19 11:04 Haroenv