{"id":13446761,"url":"https://github.com/appleboy/npm-vs-yarn","last_synced_at":"2025-10-08T03:34:02.692Z","repository":{"id":52140364,"uuid":"70771254","full_name":"appleboy/npm-vs-yarn","owner":"appleboy","description":"npm vs yarn install speed testing.","archived":false,"fork":false,"pushed_at":"2023-01-11T22:27:16.000Z","size":1707,"stargazers_count":70,"open_issues_count":13,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-15T12:28:37.215Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/appleboy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-13T05:14:00.000Z","updated_at":"2024-10-31T23:22:55.000Z","dependencies_parsed_at":"2023-02-09T08:31:40.141Z","dependency_job_id":null,"html_url":"https://github.com/appleboy/npm-vs-yarn","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/appleboy/npm-vs-yarn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appleboy%2Fnpm-vs-yarn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appleboy%2Fnpm-vs-yarn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appleboy%2Fnpm-vs-yarn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appleboy%2Fnpm-vs-yarn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appleboy","download_url":"https://codeload.github.com/appleboy/npm-vs-yarn/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appleboy%2Fnpm-vs-yarn/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260847051,"owners_count":23071858,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T05:00:59.069Z","updated_at":"2025-10-08T03:33:57.644Z","avatar_url":"https://github.com/appleboy.png","language":"Dockerfile","funding_links":[],"categories":["Dockerfile"],"sub_categories":[],"readme":"# npm-vs-yarn\n\n[Npm][1] vs [Yarn][2] install speed testing. \n\n## What is Yarn\n\nYarn is a new package manager for JavaScript. Please read [blog post][3] from [Facebook][4] for detail information.\n\n[1]:https://www.npmjs.com/\n[2]:https://yarnpkg.com/\n[3]:https://code.facebook.com/posts/1840075619545360\n[4]:https://code.facebook.com/\n\n## Prepare Environment\n\nYou can testing in Docker or what you prefer.\n\n* node version: `v10.11.0`\n* npm verison: `6.4.1`\n* yarn verison: `1.9.4`\n\n## Testing without cache\n\nTesting install speed without cache `node_modules` folder.\n\n```\n$ rm -rf ~/.npm/_cacache/\n$ time npm install\n```\n\ntime: `3m40.155s`\n\nTry [npm ci](https://docs.npmjs.com/cli/ci) command\n\n```\n$ rm -rf ~/.npm/_cacache/\n$ time npm ci\n```\n\ntime: `3m10.783s`\n\n```\n$ yarn cache clean\n$ time yarn install\n```\n\ntime: `1m1.261s`\n\n## Testing with cache\n\nTesting install speed **without** include cache `node_modules` folder.\n\n```\n$ rm -rf node_modules\n$ time npm install\n```\n\ntime: `1m1.195s`\n\nTry [npm ci](https://docs.npmjs.com/cli/ci) command\n\n```\n$ rm -rf node_modules\n$ time npm ci\n```\n\ntime: `0m18.030s`\n\n```\n$ rm -rf node_modules\n$ time yarn install\n```\n\ntime: `0m30.571s`\n\nTesting install speed **with** cache `node_modules` folder.\n\n```\n$ time npm install\n```\n\ntime: `0m54.944s`\n\n```\n$ time npm ci\n```\n\ntime: `0m21.810s`\n\n```\n$ time yarn install\n```\n\ntime: `0m2.109s`\n\n## Conclusion\n\nDate: 2018-10-02\n\nYarn is faster than npm. We can move package manager from Npm to Yarn for JavaScript now.\n\n|                                              | npm install   | npm ci  | yarn | \n|----------------------------------------------|---------------|---------|------|\n| install without cache (without node_modules) | 3m            | 3m      | 1m   |\n| install with cache (without node_modules)    | 1m            | 18s     | 30s  |\n| install with cache (with node_modules)       | 54s           | 21s     | 2s   |\n| install without internet (with node_modules) | -             | -       | 2s   |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappleboy%2Fnpm-vs-yarn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappleboy%2Fnpm-vs-yarn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappleboy%2Fnpm-vs-yarn/lists"}