npm install --save-peer react

Category: Node.js & npm/yarn

npm install --save-peer react

Install a package as a peer dependency

Writes the package into peerDependencies, the section that tells consumers which versions of another library your package expects to share. Peer deps are not installed automatically for the package author, only for its users. Common for plugins that must match a host library version.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.