Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next build fails only in Github Action #74792

Open
yudataguy opened this issue Jan 11, 2025 · 0 comments
Open

Next build fails only in Github Action #74792

yudataguy opened this issue Jan 11, 2025 · 0 comments
Labels
bug Issue was opened via the bug report template. Output (export/standalone) Related to the the output option in `next.config.js`.

Comments

@yudataguy
Copy link

Link to the code that reproduces this issue

https://github.com/jpaise/search-frontend

To Reproduce

 - name: Setup pnpm
        uses: pnpm/action-setup@v4
        with:
          version: 10

      - name: Set up Node.js
        uses: actions/setup-node@v4
        with:
          node-version: '18'

      - name: Install dependencies
        run: pnpm install

      - name: Build and Export project
        run: pnpm build

this would result

   ▲ Next.js 15.2.0-canary.4

   Creating an optimized production build ...
 ✓ Compiled successfully
   Linting and checking validity of types ...
 ELIFECYCLE  Command failed with exit code 1.
 ``` 
 
 in github action with no clear error message. I've tried `npm`, `yarn` and `pnpm`, all same results. Earlier Nextjs version, same result, if I disable linting, then the error will display in the next step. So pretty much all the possible combinations has been tried. 
 
 next.config.js
 ```
 /** @type {import('next').NextConfig} */
const nextConfig = {
  output: 'export',
  images: {
    unoptimized: true,
    domains: [], // Add any image domains you're using
  },
  trailingSlash: true,
  assetPrefix: process.env.NODE_ENV === 'production' ? './' : '',
  reactStrictMode: true,
}

module.exports = nextConfig

Current vs. Expected behavior

Everything works fine in local (ubuntu) environment, but it just somehow stuck on github action build. All the local env matches cloud ones.

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #83~20.04.1-Ubuntu SMP Fri Oct 4 21:49:59 UTC 2024
  Available memory (MB): 15992
  Available CPU cores: 4
Binaries:
  Node: 18.20.5
  npm: 10.8.2
  Yarn: 1.22.22
  pnpm: 10.0.0
Relevant Packages:
  next: 15.2.0-canary.4 // Latest available version is detected (15.2.0-canary.4).
  eslint-config-next: 15.1.4
  react: 19.0.0
  react-dom: 19.0.0
  typescript: 5.7.3
Next.js Config:
  output: export

Which area(s) are affected? (Select all that apply)

Output (export/standalone)

Which stage(s) are affected? (Select all that apply)

next build (local), Other (Deployed)

Additional context

No response

@yudataguy yudataguy added the bug Issue was opened via the bug report template. label Jan 11, 2025
@github-actions github-actions bot added the Output (export/standalone) Related to the the output option in `next.config.js`. label Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template. Output (export/standalone) Related to the the output option in `next.config.js`.
Projects
None yet
Development

No branches or pull requests

1 participant