install npm workspace dependencies completely inside workspace
Asked Answered
P

0

7

Is it possible to run an npm ci --workspace=[some workspace] command and confine the installed dependencies inside that specific workspace directory, instead of bubbling up the shared ones to the project root node_modules folder?

Purpose: I have a mono repo, and I would like to install the workspace dependencies, respect the root package-lock, and have them all in one place inside that one workspace. So I can copy the whole specific workspace directory and run the server from another location. Otherwise, I have to carefully merge the two node_module folders using a script.

Am I not thinking of the best way to approach this, and is this possible regardless?

EDIT: This seems to be exactly what I'm describing https://github.com/npm/rfcs/issues/287

Phenocryst answered 10/4, 2022 at 2:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.