calcom / docker

The Docker configuration for Cal.com is an effort powered by people within the community. Cal.com, Inc. does not provide official support for Docker, but we will accept fixes and documentation. Use at your own risk.
MIT License
619 stars 323 forks source link

@calcom/web:build: ERROR: command finished with error: command (/calcom/apps/web) yarn run build exited (129) #349

Closed chriscroome closed 2 months ago

chriscroome commented 3 months ago

I'm following the (Advanced users) Build and Run Cal.com instructions and it is failing with the following error:

@calcom/prisma:build: Datasource "db": PostgreSQL database "cal", schema "public" at "database:5432"
@calcom/prisma:build: 
@calcom/prisma:build: 280 migrations found in prisma/migrations
@calcom/prisma:build: 
@calcom/prisma:build: 
@calcom/prisma:build: No pending migrations to apply.
@calcom/prisma:build: 
@calcom/prisma:build: 
@calcom/embed-snippet:build: vite v4.5.2 building for production...
@calcom/embed-snippet:build: transforming...
@calcom/embed-snippet:build: ✓ 1 modules transformed.
@calcom/embed-snippet:build: rendering chunks...
@calcom/embed-snippet:build: computing gzip size...
@calcom/embed-snippet:build: dist/snippet.es.js  1.01 kB │ gzip: 0.58 kB
@calcom/embed-snippet:build: Entry module "src/index.ts" is using named and default exports together. Consumers of your bundle will have to use `snippet.default` to access the default export, which may not be what you want. Use `output.exports: "named"` to disable this warning.
@calcom/embed-snippet:build: dist/snippet.umd.js  0.89 kB │ gzip: 0.57 kB
@calcom/embed-snippet:build: ✓ built in 475ms
@calcom/embed-react:build: cache miss, executing 837577fb135532b8
@calcom/embed-react:build: vite v4.5.2 building for production...
@calcom/embed-react:build: transforming...
@calcom/embed-react:build: src/index.ts (1:0) Error when using sourcemap for reporting an error: Can't resolve original location of error.
@calcom/embed-react:build: src/index.ts (1:0) Module level directives cause errors when bundled, "use client" in "src/index.ts" was ignored.
@calcom/embed-react:build: src/Cal.tsx (1:0) Error when using sourcemap for reporting an error: Can't resolve original location of error.
@calcom/embed-react:build: src/Cal.tsx (1:0) Module level directives cause errors when bundled, "use client" in "src/Cal.tsx" was ignored.
@calcom/embed-react:build: src/useEmbed.ts (1:0) Error when using sourcemap for reporting an error: Can't resolve original location of error.
@calcom/embed-react:build: src/useEmbed.ts (1:0) Module level directives cause errors when bundled, "use client" in "src/useEmbed.ts" was ignored.
@calcom/embed-react:build: ✓ 13 modules transformed.
@calcom/embed-react:build: rendering chunks...
@calcom/embed-react:build: computing gzip size...
@calcom/embed-react:build: dist/Cal.es.js  23.13 kB │ gzip: 7.11 kB
@calcom/embed-react:build: dist/Cal.umd.js  15.13 kB │ gzip: 6.07 kB
@calcom/embed-react:build: ✓ built in 1.31s
@calcom/web:build: cache miss, executing 63907efcef44d90f
@calcom/web:build: warn  EMAIL_FROM environment variable is not set, this may indicate mailing is currently disabled. Please refer to the .env.example file.
@calcom/web:build: Duplicate value found in common.json keys:   seats_available_other and seats_available_one
@calcom/web:build: Duplicate value found in common.json keys:   location_variable and location
@calcom/web:build: Duplicate value found in common.json keys:   additional_notes_variable and additional_notes
@calcom/web:build: Duplicate value found in common.json keys:   already_have_account and already_have_an_account
@calcom/web:build: Duplicate value found in common.json keys:   timezone_variable and timezone
@calcom/web:build: Duplicate value found in common.json keys:   scheduling_for_your_team and workflow_automation
@calcom/web:build: Duplicate value found in common.json keys:   saml_sso and saml_config
@calcom/web:build: Duplicate value found in common.json keys:   advanced_managed_events_description and unified_billing_description
@calcom/web:build: Duplicate value found in common.json keys:   email_team_invite|subject|invited_to_subteam and user_invited_you_to_subteam
@calcom/web:build: Duplicate value found in common.json keys:   email_team_invite|heading|invited_to_regular_team and email_no_user_invite_heading_team
@calcom/web:build: Duplicate value found in common.json keys:   email_team_invite|content|invited_to_regular_team and email_user_invite_subheading_team
@calcom/web:build: Duplicate value found in common.json keys:   create_an_out_of_office and ooo_create_entry_modal
@calcom/web:build: Attention: Next.js now collects completely anonymous telemetry regarding usage.
@calcom/web:build: This information is used to shape Next.js' roadmap and prioritize features.
@calcom/web:build: 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:
@calcom/web:build: https://nextjs.org/telemetry
@calcom/web:build: 
@calcom/web:build:    Creating an optimized production build ...
@calcom/web:build: <w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (836kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
@calcom/web:build: Browserslist: caniuse-lite is outdated. Please run:
@calcom/web:build:   npx update-browserslist-db@latest
@calcom/web:build:   Why you should do it regularly: https://github.com/browserslist/update-db#readme
@calcom/web:build: Browserslist: caniuse-lite is outdated. Please run:
@calcom/web:build:   npx browserslist@latest --update-db
@calcom/web:build:   Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
@calcom/web:build: ERROR: command finished with error: command (/calcom/apps/web) yarn run build exited (129)
command (/calcom/apps/web) yarn run build exited (129)

 Tasks:    6 successful, 7 total
Cached:    0 cached, 7 total
  Time:    12m22.908s 
Failed:    @calcom/web#build

 ERROR  run failed: command  exited (129)
The command '/bin/sh -c yarn turbo run build --filter=@calcom/web' returned a non-zero code: 129

Has anyone else come across this? Does anyone have any suggestions regarding how I could further debug or fix this?

intersecato commented 3 months ago

same error

chriscroome commented 3 months ago

I have tried again with version 4.0.0 and I still have this error.

Also I outputted the results to a TXT file and then grepped for error, omitting YN0013 and these results were returned, I don't know if this is relevant?

grep -i error ~/tmp/update.txt | grep -v YN0013
➤ YN0002: │ @calcom/ee@workspace:packages/features/ee doesn't provide react (p8fe64), requested by @hookform/error-message
➤ YN0002: │ @calcom/ee@workspace:packages/features/ee doesn't provide react-dom (p0eda1), requested by @hookform/error-message
➤ YN0002: │ @calcom/ee@workspace:packages/features/ee doesn't provide react-hook-form (pb317e), requested by @hookform/error-message
Error adding google credentials to DB: Unexpected end of JSON input
@calcom/embed-react:build: src/index.ts (1:0) Error when using sourcemap for reporting an error: Can't resolve original location of error.
@calcom/embed-react:build: src/index.ts (1:0) Module level directives cause errors when bundled, "use client" in "src/index.ts" was ignored.
@calcom/embed-react:build: src/Cal.tsx (1:0) Error when using sourcemap for reporting an error: Can't resolve original location of error.
@calcom/embed-react:build: src/Cal.tsx (1:0) Module level directives cause errors when bundled, "use client" in "src/Cal.tsx" was ignored.
@calcom/embed-react:build: src/useEmbed.ts (1:0) Error when using sourcemap for reporting an error: Can't resolve original location of error.
@calcom/embed-react:build: src/useEmbed.ts (1:0) Module level directives cause errors when bundled, "use client" in "src/useEmbed.ts" was ignored.
@calcom/web:build: ERROR: command finished with error: command (/calcom/apps/web) yarn run build exited (129)
 ERROR  run failed: command  exited (129)
chriscroome commented 3 months ago

I just tried again with version 4.0.1 and it failed in the same manner:

@calcom/web:build:    Creating an optimized production build ...
@calcom/web:build: <w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (836kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
@calcom/web:build: Browserslist: caniuse-lite is outdated. Please run:
@calcom/web:build:   npx update-browserslist-db@latest
@calcom/web:build:   Why you should do it regularly: https://github.com/browserslist/update-db#readme
@calcom/web:build: Browserslist: caniuse-lite is outdated. Please run:
@calcom/web:build:   npx browserslist@latest --update-db
@calcom/web:build:   Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
@calcom/web:build: ERROR: command finished with error: command (/calcom/apps/web) yarn run build exited (129)
command (/calcom/apps/web) yarn run build exited (129)

 Tasks:    6 successful, 7 total
Cached:    0 cached, 7 total
  Time:    13m35.743s 
Failed:    @calcom/web#build

 ERROR  run failed: command  exited (129)
The command '/bin/sh -c yarn turbo run build --filter=@calcom/web' returned a non-zero code: 129

Is there anything I can do to help debug this issue?

chriscroome commented 2 months ago

I have tried again with version 4.0.2 and there is still the same error:

@calcom/web:build: warn  EMAIL_FROM environment variable is not set, this may indicate mailing is currently disabled. Please refer to the .env.example file.
@calcom/web:build: Duplicate value found in common.json keys:   seats_available_other and seats_available_one
@calcom/web:build: Duplicate value found in common.json keys:   location_variable and location
@calcom/web:build: Duplicate value found in common.json keys:   additional_notes_variable and additional_notes
@calcom/web:build: Duplicate value found in common.json keys:   already_have_account and already_have_an_account
@calcom/web:build: Duplicate value found in common.json keys:   timezone_variable and timezone
@calcom/web:build: Duplicate value found in common.json keys:   scheduling_for_your_team and workflow_automation
@calcom/web:build: Duplicate value found in common.json keys:   saml_sso and saml_config
@calcom/web:build: Duplicate value found in common.json keys:   advanced_managed_events_description and unified_billing_description
@calcom/web:build: Duplicate value found in common.json keys:   email_team_invite|subject|invited_to_subteam and user_invited_you_to_subteam
@calcom/web:build: Duplicate value found in common.json keys:   email_team_invite|heading|invited_to_regular_team and email_no_user_invite_heading_team
@calcom/web:build: Duplicate value found in common.json keys:   email_team_invite|content|invited_to_regular_team and email_user_invite_subheading_team
@calcom/web:build: Duplicate value found in common.json keys:   create_an_out_of_office and ooo_create_entry_modal
@calcom/web:build: Attention: Next.js now collects completely anonymous telemetry regarding usage.
@calcom/web:build: This information is used to shape Next.js' roadmap and prioritize features.
@calcom/web:build: 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:
@calcom/web:build: https://nextjs.org/telemetry
@calcom/web:build: 
@calcom/web:build:    Creating an optimized production build ...
@calcom/web:build: <w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (836kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
@calcom/web:build: Browserslist: caniuse-lite is outdated. Please run:
@calcom/web:build:   npx update-browserslist-db@latest
@calcom/web:build:   Why you should do it regularly: https://github.com/browserslist/update-db#readme
@calcom/web:build: Browserslist: caniuse-lite is outdated. Please run:
@calcom/web:build:   npx browserslist@latest --update-db
@calcom/web:build:   Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
@calcom/web:build: ERROR: command finished with error: command (/calcom/apps/web) yarn run build exited (129)
command (/calcom/apps/web) yarn run build exited (129)

 Tasks:    6 successful, 7 total
Cached:    0 cached, 7 total
  Time:    13m25.699s 
Failed:    @calcom/web#build

 ERROR  run failed: command  exited (129)
The command '/bin/sh -c yarn turbo run build --filter=@calcom/web' returned a non-zero code: 129

Does anyone know if this is fixable or if there is anything I can do to help debug this issue?

chriscroome commented 2 months ago

Thanks to the suggestion here I have it working, closing -- the server did have 3GiB of RAM, I shut it down, allocated 32GiB and the build worked.