react-unpin
Unpin your framework's React version to install it locally
This helps to avoid breaking changes between React Canaries used by your framework and other tools, such as when using Server Components in tests, docs, or monorepo packages.
[!NOTE] This is unnecessary with newer versions of Next (since
14.3.0-canary.45
and15.0.0-rc.0
), which have started usingpeerDependencies
to keep the React version consistent.
unpin [path]
react-unpin [path]
By default, unpin
and react-unpin
will print the React version pinned in the
current directory's package. You can optionally provide a single path to check a
different directory's package. The React version pinned by Server Component
frameworks typically starts with 18.3.0-canary-
or 19.0.0-canary-
.
npx react-unpin@latest
yarn dlx react-unpin
pnpm dlx react-unpin
bun x react-unpin
Installing react-unpin
locally isn't necessary unless you want to use it in a
library or script.
npm install react-unpin
yarn add react-unpin
pnpm add react-unpin
bun add react-unpin
node_modules
directory is required to resolve local Next installations,