Skip to content

Commit

Permalink
fix(cli): reset NODE_ENV to ensure install command run in dev mode (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
situ2001 authored Oct 31, 2024
1 parent 94eaeea commit 9ca89b3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/itchy-flowers-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Resets `NODE_ENV` to ensure install command run in dev mode
8 changes: 7 additions & 1 deletion packages/astro/src/cli/install-package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,13 @@ async function installPackage(
await exec(
installCommand.pm,
[installCommand.command, ...installCommand.flags, ...installCommand.dependencies],
{ nodeOptions: { cwd: cwd } },
{
nodeOptions: {
cwd,
// reset NODE_ENV to ensure install command run in dev mode
env: { NODE_ENV: undefined },
}
},
);
spinner.succeed();

Expand Down

0 comments on commit 9ca89b3

Please sign in to comment.