---
title: "Discussion on \"Node.js TypeScript monorepo via NPM workspaces\" | Hashnode"
description: "Discussion on \"Node.js TypeScript monorepo via NPM workspaces\". Monorepos are all the rage right now. Build a Node.js TypeScript monorepo without all the complex tools - using only NPM workspaces."
url: "https://hashnode.com/posts/nodejs-typescript-monorepo-via-npm-workspaces/62f8e35b69fa1793160c55e8"
---

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

Discussion

# [Node.js TypeScript monorepo via NPM workspaces](https://daveiscoding.com/nodejs-typescript-monorepo-via-npm-workspaces?utm_source=hashnode&utm_medium=feed)

Monorepos are all the rage right now. Build a Node.js TypeScript monorepo without all the complex tools - using only NPM workspaces.

Aug 14, 2022 · 5 min read · daveiscoding.com  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#typescript](https://hashnode.com/tag/typescript)
-   [#npm](https://hashnode.com/tag/npm)
-   [#tutorial](https://hashnode.com/tag/tutorial)
-   [#monorepo](https://hashnode.com/tag/monorepo)

## Written by

[Dávid Szabó](https://hashnode.com/@davidszabo)

@davidszabo · Hungary

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

Lead Software Engineer @ Suxess Logistic

Full stack dev who loves to experiment, learn new things, and write stupid simple code.

## Responses 2

Markdown supported · ⌘↵ to post

[seth](https://hashnode.com/@seth4520)

[Feb 7, 2023](https://hashnode.com/posts/nodejs-typescript-monorepo-via-npm-workspaces/62f8e35b69fa1793160c55e8/comment/63e28983cecce1c954ae00e8)

Nice summary. A question about the placement of the rootDir and ourDir compiler options. Why not place that in the tsconfig.base.json? Then it only has to be done once? Is there something about placing it there that changes things?

[Dávid Szabó](https://hashnode.com/@davidszabo)

[Feb 18, 2023](https://hashnode.com/posts/nodejs-typescript-monorepo-via-npm-workspaces/62f8e35b69fa1793160c55e8/comment/63e28983cecce1c954ae00e8#reply-63f0ab6a34c25f8061772f7b)

That would break the compilation because the paths are always relative to the original configuration file. In this case, specifying these paths in the tsconfig.base.json, would mean that the paths are relative to the base file.

[typescriptlang.org/tsconfig](https://www.typescriptlang.org/tsconfig#extends) Properties with relative paths found in the configuration file, which aren’t excluded from inheritance, will be resolved relative to the configuration file they originated in.

[Samet ÇELİKBIÇAK](https://hashnode.com/@sametcelikbicak)

[Aug 15, 2022](https://hashnode.com/posts/nodejs-typescript-monorepo-via-npm-workspaces/62f8e35b69fa1793160c55e8/comment/62fa4a9ffffdab933bdecbcb)

very nice content, thanks for sharing this information with a basic and understandable example.
