같은 이름은 dependencies 에 한 번만 들어간다 — <별칭>@npm:<이름>@<버전> 으로 별칭을 달면 여러 버전이 나란히 설치된다.1
yarn add react-tooltip-5@npm:react-tooltip@5.8.3
{
"react-tooltip-5": "npm:react-tooltip@5.8.3"
}
- how to install multiple versions of package using npm - Stack Overflow
- How to install multiple versions of a npm package at the same time/project - DEV Community
Footnotes
-
npm-install | npm Docs:
npm install <alias>@npm:<name>— “Install a package under a custom alias. Allows multiple versions of a same-name package side-by-side, …” / “Aliasing works only on your project and does not rename packages in transitive dependencies.” ↩