Skip to content

Commit

Permalink
fix: npm init @rainbow-me/rainbowkit@latest not working (#1954)
Browse files Browse the repository at this point in the history
* fix: npm init @rainbow-me/rainbowkit@latest

* chore: rename

* chore: changesets

---------

Co-authored-by: Magomed Khamidov <53529533+KosmosKey@users.noreply.github.com>
  • Loading branch information
magiziz and magiziz authored May 6, 2024
1 parent af4ea4e commit ef53ede
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/fast-doors-divide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rainbow-me/create-rainbowkit": patch
---

Added `--legacy-peer-deps` flag when running `npm init @rainbow-me/rainbowkit@latest`.
5 changes: 3 additions & 2 deletions packages/create-rainbowkit/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,17 +185,18 @@ async function run() {
)}. This could take a while.`,
),
);
await execa(packageManager, ['install'], {
const flag = packageManager === 'npm' ? '--legacy-peer-deps' : undefined;
await execa(packageManager, ['install', ...(flag ? [flag] : [])], {
cwd: targetPath,
stdio: 'inherit',
});

if (process.env.INSTALL_WORKSPACE_RAINBOWKIT !== 'true') {
await execa(
packageManager,
[
packageManager === 'yarn' ? 'add' : 'install',
'@rainbow-me/rainbowkit',
...(flag ? [flag] : []),
],
{
cwd: targetPath,
Expand Down

0 comments on commit ef53ede

Please sign in to comment.