Categories
JavaScript Answers

How to make multiple projects share node_modules directory with JavaScript?

Spread the love

To make multiple projects share node_modules directory with JavaScript, we use pnpm.

To install it globally, we run

npm install -g pnpm

Then we install all the packages for all the projects in the folder in one node_modules directory with

pnpm recursive install

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *