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

Front-end prod app build will fail with Docker #66

Closed
ical10 opened this issue May 15, 2024 · 0 comments
Closed

Front-end prod app build will fail with Docker #66

ical10 opened this issue May 15, 2024 · 0 comments
Assignees

Comments

@ical10
Copy link
Contributor

ical10 commented May 15, 2024

Running docker compose command to build the production app
docker-compose -f ./docker-compose.frontend.yaml up

will show an error such as below:

 => ERROR [frontend-prod builder 1/1] RUN NEXT_BUILD_STANDALONE=true pnpm --filter='*frontend' build  && pnpm --filter='*frontend' deploy pruned --prod                                                                                                        48.0s
------
 > [frontend-prod builder 1/1] RUN NEXT_BUILD_STANDALONE=true pnpm --filter='*frontend' build  && pnpm --filter='*frontend' deploy pruned --prod:
0.550 
0.550 > @inkathon/[email protected] build /app/frontend
0.550 > NODE_ENV=production next build
0.550 
1.388 Attention: Next.js now collects completely anonymous telemetry regarding usage.
1.388 This information is used to shape Next.js' roadmap and prioritize features.
1.388 You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
1.388 https://nextjs.org/telemetry
1.388 
1.446   ▲ Next.js 14.2.3
1.446   - Environments: .env.local
1.446 
1.509    Creating an optimized production build ...
29.38  ✓ Compiled successfully
29.38    Linting and checking validity of types ...
34.60    Collecting page data ...
35.44    Generating static pages (0/5) ...
35.91    Generating static pages (1/5) 
35.91    Generating static pages (2/5) 
35.91    Generating static pages (3/5) 
35.92  ✓ Generating static pages (5/5)
36.32    Finalizing page optimization ...
36.32    Collecting build traces ...
45.36 
45.37 Route (app)                              Size     First Load JS
45.37 ┌ ○ /                                    59.3 kB         562 kB
45.37 └ ○ /_not-found                          872 B          88.2 kB
45.37 + First Load JS shared by all            87.3 kB
45.37   ├ chunks/350-517ce4390b75eaef.js       31.5 kB
45.37   ├ chunks/8a6c70d3-b137850d6336eb59.js  53.6 kB
45.37   └ other shared chunks (total)          2.19 kB
45.37 
45.37 
45.37 ○  (Static)  prerendered as static content
45.37 
45.76  ERR_PNPM_DEPLOY_DIR_NOT_EMPTY  Deploy path /app/pruned is not empty
------
failed to solve: process "/bin/sh -c NEXT_BUILD_STANDALONE=true pnpm --filter='*frontend' build  && pnpm --filter='*frontend' deploy pruned --prod" did not complete successfully: exit code: 1

Since the path /app/pruned is not empty, we need to force remove it to avoid failure on subsequent runs (see pnpm/pnpm#7561).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

No branches or pull requests

2 participants