#weird error
1 messages · Page 1 of 1 (latest)
Based on the knowledge sources provided, I can see that you're experiencing an issue where your CI pipeline is encountering ESLint errors during the build process, but these errors don't appear when you run bun lint or build locally.
This discrepancy between CI and local environments is a common issue with Next.js projects, especially when using Bun as a package manager in monorepos or with certain configurations.
From the knowledge sources, there are a few potential causes:
-
ESLint Configuration: Next.js by default fails production builds when ESLint errors are present. This behavior might be different between your local environment and CI.
-
Bun Compatibility Issues: Several issues have been reported with Next.js builds in CI environments when using Bun, particularly in monorepos or with specific lockfile configurations.
To resolve this issue, you could try:
- Disable ESLint during builds: You can modify your
next.config.jsto ignore ESLint errors during builds:
module.exports = {
eslint: {
// Warning: This allows production builds to successfully complete even if
// your project has ESLint errors.
ignoreDuringBuilds: true,
},
}
This is documented in Next.js ESLint configuration.
-
Check for lockfile issues: If you're using Bun's text lockfile (bun.lock), this might cause issues as mentioned in this GitHub issue.
-
Ensure consistent Node.js/Bun versions: Make sure your CI environment is using the same versions as your local environment.
- Check for monorepo-specific issues: If your project is in a monorepo, there are known issues with Next.js builds in such setups when using Bun, as described in this GitHub issue.