Repository navigation
Turbopack Error: Too many open files (os error 24) #95251
audyalvasyha
started this conversation in
Turbopack Error Report
Replies: 2 comments
|
This is a common issue with Turbopack and file watchers. Here's how to fix it: Fix 1: Increase file limit (Linux/macOS)Check current limit: ulimit -nIncrease temporarily: ulimit -n 10000Make it permanent (add to ~/.zshrc or ~/.bashrc): echo "ulimit -n 10000" >> ~/.zshrcFix 2: For macOS specifically Create a file: sudo nano /Library/LaunchDaemons/limit.maxfiles.plistAdd this content: <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>limit.maxfiles</string>
<key>ProgramArguments</key>
<array>
<string>launchctl</string>
<string>limit</string>
<string>maxfiles</string>
<string>100000</string>
<string>100000</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>Then load it: sudo launchctl load -w /Library/LaunchDaemons/limit.maxfiles.plistFix 3: Next.js specific Add this to next.config.js: module.exports = {
experimental: {
turbopack: {
watchOptions: {
ignored: ['**/node_modules/**', '**/.git/**']
}
}
}
}Fix 4: Clear cache rm -rf .next
rm -rf node_modules/.cache
npm install
npm run devTemporary workaround Use Webpack instead of Turbopack: npm run dev -- --webpackTry these in order. The ulimit fix usually resolves it for most users. Let me know which one works! |
0 replies
|
thanks bro👍 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Turbopack version:
0c06f068Next.js version:
0.0.0Error message:
All reactions