npm / npm/rfcs

[RRFC] node_modules using high disk space

Open
#409 1 comment 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
777
Forks
267
PR merge metrics
No merged PRs in 30d

Description

Motivation ("The Why")

The node_modules is consuming a large disk space. So,. It would be better if it installs the packages in the root of the user in the computer.
In windows the path would look like: C:\Users\user_name\node_modules.
Users could install the different versions of a package.
And it would import packages matching the version inside the package.json.
Python packages📦 use this kind of concept and it consumes less storage.It only does one installation.And we don't neee to install it again.

Example

Using less storage space.
Avoiding the large node_modules folder in every single project.
Just one node_modules in the root of the user.
Users could install the different versions of a package.
And it would import packages matching the version inside the package.json.

How
Current Behaviour

Currently npm does install the whole project packages in the project folder📁.This takes up the storage of the system.I know we can import packages from the root folder. But, this kinda idea should be the only way to import packages 📦. As it increases perfomance.

Desired Behaviour

When we run npm install it should only install in the root user folder.

References
  • n/a

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue refers to npm install, node_modules, and package.json, but names no repository files, tests, or entry points. Start by investigating the current installation and dependency-resolution behavior; done would require a decided design for shared user-level storage, version matching, and reduced per-project disk usage.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.