mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-22 11:13:26 +00:00
fix: improve npm dependency installation in installer
- Switch from npm install to npm ci for clean installs based on package-lock.json - Add fallback to npm install if npm ci fails - Remove --unsafe-perm flag and use --omit=dev for production installs - Show dependency installation output (filtering npm WARN messages) This ensures that package-lock.json changes are properly applied during updates, fixing issues where old dependencies remain after updates. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -2204,9 +2204,16 @@ case "$INSTALL_MODE" in
|
||||
if [ "$TARBALL_INSTALL_SUCCESS" != "true" ]; then
|
||||
print_info "Installing NPM dependencies in $PULSE_DIR..."
|
||||
cd "$PULSE_DIR" || { print_error "Failed to cd to $PULSE_DIR before npm install"; exit 1; }
|
||||
if ! npm install --unsafe-perm --silent; then
|
||||
print_error "Failed to install NPM dependencies. See output above."
|
||||
exit 1
|
||||
|
||||
# Use npm ci for clean install based on package-lock.json
|
||||
print_info "Performing clean install of dependencies..."
|
||||
if ! npm ci --omit=dev 2>&1 | grep -v "^npm WARN"; then
|
||||
print_error "Failed to install NPM dependencies."
|
||||
print_error "Falling back to npm install..."
|
||||
if ! npm install --omit=dev 2>&1 | grep -v "^npm WARN"; then
|
||||
print_error "Failed to install NPM dependencies. See output above."
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
print_success "NPM dependencies installed."
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user