Skip to content

Commit 3a36d23

Browse files
cj-vanaclaude
andcommitted
fix: Use npm ci for clean dependency install on Netlify
Netlify's cached node_modules was missing @tailwindcss/postcss. Using npm ci ensures a fresh install from package-lock.json. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent de3bf26 commit 3a36d23

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

netlify.toml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
# Uses Next.js 16+ with App Router
33

44
[build]
5-
# Build command for Next.js
6-
command = "npm run build"
5+
# Build command for Next.js - use npm ci for clean install
6+
command = "npm ci && npm run build"
77
# Publish directory for Next.js with Netlify
88
publish = ".next"
99

@@ -12,6 +12,8 @@
1212
NODE_VERSION = "20"
1313
# Ensure npm version compatibility
1414
NPM_VERSION = "10"
15+
# Skip dependency cache to ensure fresh install
16+
NPM_FLAGS = "--prefer-offline=false"
1517

1618
# Netlify Next.js Runtime (automatically detected, but explicit is better)
1719
[[plugins]]
@@ -61,18 +63,18 @@
6163

6264
# Development/Preview context overrides
6365
[context.deploy-preview]
64-
command = "npm run build"
66+
command = "npm ci && npm run build"
6567
[context.deploy-preview.environment]
6668
NODE_ENV = "development"
6769

6870
[context.branch-deploy]
69-
command = "npm run build"
71+
command = "npm ci && npm run build"
7072
[context.branch-deploy.environment]
7173
NODE_ENV = "development"
7274

7375
# Production context
7476
[context.production]
75-
command = "npm run build"
77+
command = "npm ci && npm run build"
7678
[context.production.environment]
7779
NODE_ENV = "production"
7880

0 commit comments

Comments
 (0)