fix(setup): install dev deps regardless of NODE_ENV#60
Merged
Conversation
npm install skips devDependencies when NODE_ENV=production is set in the shell. This silently breaks the local dev stack because tsx, vite, vitest, prisma, and other dev tools never get installed. The setup script now passes --include=dev so fresh clones work regardless of the user's shell state.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When `NODE_ENV=production` is set in the user's shell, `npm install` skips `devDependencies`. In a monorepo workspace this means tsx, vite, vitest, prisma, and other dev tools never get hoisted to `node_modules/.bin/`. The setup script appears to succeed, but `npm run dev` immediately fails with `command not found: tsx` and `command not found: vite`.
Fix
Pass `--include=dev` to `npm install` in the setup script. This forces npm to install dev dependencies regardless of the `NODE_ENV` value.
Verification
Risk
Zero. This only affects the local development setup path. Production installs are not driven by this script.