Skip to content
This repository was archived by the owner on Aug 11, 2022. It is now read-only.
This repository was archived by the owner on Aug 11, 2022. It is now read-only.

NPM and using symlinks instead of full copy to local modules. #12515

@tomitrescak

Description

@tomitrescak

Hi, this may be a silly question which I tried to find answers to online but I failed, so I'm asking here. NPM always copies all files to local modules when doing npm install .... This is a nightmare for moving files around, backups, size (SSD drives). For example, I have several Javascript/Webpack projects (around 20-30) which share 99% of modules. Each project has around 700MB - 1GB due to te size of node modules dir (1-2MB w/o node_modules) making it easy 30GB of files out of which are 99.5% the same.

My questions is: Is it possible to setup NPM so that it would use symlinks from local repository to project modules instead of tediously copying everything into every new project?

I know that one way of doing this is via global modules and npm linking ... this is not good obviously as it would fail in CI. Meteor package service (Atmosphere) is doing this and it really saves a lot of space/instalation time.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions