Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/gold-actors-doubt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"flowbite-react": patch
---

fix: Error: spawn npm ENOENT
2 changes: 1 addition & 1 deletion bun.lock
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
},
"packages/ui": {
"name": "flowbite-react",
"version": "0.12.5",
"version": "0.12.7",
"bin": {
"flowbite-react": "./dist/cli/bin.js",
},
Expand Down
6 changes: 5 additions & 1 deletion packages/ui/src/cli/commands/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@ export async function installPackage() {
const { command = "", args } = resolveCommand(pm.agent, "add", [packageName]) ?? {};

console.log(`Installing ${packageName} using ${pm.name}...`);
await execCommand(command, args);
await execCommand(withWindowsSupport(command), args);
} catch (error) {
console.error(`Failed to install ${packageName}:`, error);
}
}

function withWindowsSupport(command: string): string {
return process.platform === "win32" ? `${command}.cmd` : command;
}
Loading