---
title: "Discussion on \"Why you shouldn't use npm workspaces\" | Hashnode"
description: "Discussion on \"Why you shouldn't use npm workspaces\". This article explains the problems with setting up a monorepo using npm workspaces, and how they can be solved with pnpm workspaces."
url: "https://hashnode.com/posts/why-you-shouldnt-use-npm-workspaces/668d015e7ed2a521f9305f24"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Why you shouldn't use npm workspaces](https://edrickleong.hashnode.dev/why-you-shouldnt-use-npm-workspaces?utm_source=hashnode&utm_medium=feed)

This article explains the problems with setting up a monorepo using npm workspaces, and how they can be solved with pnpm workspaces.

Jul 9, 2024 · 8 min read · edrickleong.hashnode.dev  
Updated Jul 11, 2024  
Read the article

-   [#npm](https://hashnode.com/tag/npm)
-   [#pnpm](https://hashnode.com/tag/pnpm)
-   [#workspaces](https://hashnode.com/tag/workspaces)
-   [#monorepo](https://hashnode.com/tag/monorepo)

## Written by

[Edrick Leong](https://hashnode.com/@edrick)

@edrick · Perth, Australia

  
[View profile](https://hashnode.com/@edrick)

Software Engineer in Perth

## Responses

Markdown supported · ⌘↵ to post

[Tirtha Guha](https://hashnode.com/@tirthaguha)

[Jul 11, 2024](https://hashnode.com/posts/why-you-shouldnt-use-npm-workspaces/668d015e7ed2a521f9305f24/comment/668f9bbfb6dba2a7e5a86392)

Npm has system level cache, `~/npm` on posix and `%LocalAppData%/npm-cache` on Windows.

If a dependency+version matches, npm pulls the package from this cache, instead of over the internet.

[Edrick Leong](https://hashnode.com/@edrick)

[Jul 11, 2024](https://hashnode.com/posts/why-you-shouldnt-use-npm-workspaces/668d015e7ed2a521f9305f24/comment/668f9bbfb6dba2a7e5a86392#reply-668f9de80b77a4141f10e1ad)

Thanks Tirtha for pointing this out!

I've removed the third point about npm being slow due to not having a global cache.
