You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 29, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 29, 2025. It is now read-only.
@calcom/web:build: Error: Please set NEXTAUTH_SECRET #129
After working past #121 I am running into a new issue.
Despite setting NEXTAUTH_SECRET in the .env file using a key generated from openssl rand -base64 32 the build process fails at the following using the docker repo as of commit 76f812d and the main repo as of 1c89afc.
$ docker compose up -d database
[+] Running 1/1
⠿ Container calcom-docker-database-1 Started 0.4s
$ DOCKER_BUILDKIT=0 docker compose build calcom
[...]
@calcom/embed-react:build: warning package.json: No license field
@calcom/embed-react:build: $ tsc --emitDeclarationOnly --declarationDir dist
@calcom/web:build: cache miss, executing a5e43aa0a1de03f2
@calcom/web:build: $ next build
@calcom/web:build: error - Failed to load next.config.js, see more info here https://nextjs.org/docs/messages/next-config-error
@calcom/web:build:
@calcom/web:build: > Build error occurred
@calcom/web:build: Error: Please set NEXTAUTH_SECRET
@calcom/web:build: at Object.<anonymous> (/calcom/apps/web/next.config.js:16:41)
@calcom/web:build: at Module._compile (internal/modules/cjs/loader.js:1085:14)
@calcom/web:build: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
@calcom/web:build: at Module.load (internal/modules/cjs/loader.js:950:32)
@calcom/web:build: at Function.Module._load (internal/modules/cjs/loader.js:790:12)
@calcom/web:build: at ModuleWrap.<anonymous> (internal/modules/esm/translators.js:199:29)
@calcom/web:build: at ModuleJob.run (internal/modules/esm/module_job.js:183:25)
@calcom/web:build: at async Loader.import (internal/modules/esm/loader.js:178:24)
@calcom/web:build: at async Object.loadConfig [as default] (/calcom/node_modules/next/dist/server/config.js:68:36)
@calcom/web:build: at async Span.traceAsyncFn (/calcom/node_modules/next/dist/trace/trace.js:79:20)
@calcom/web:build: error Command failed with exit code 1.
@calcom/web:build: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@calcom/web:build: Error: command finished with error: command (apps/web) yarn run build exited (1)
Tasks: 4 successful, 5 total
Cached: 0 cached, 5 totalcommand (apps/web) yarn run build exited (1)
Time: 15.318s
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
1 error occurred:
* Status: The command '/bin/sh -c yarn build' returned a non-zero code: 1, Code: 1
$
@GlitchWitch you should be able to follow the dockerfile and add the variable to the arg and env steps, then also add the equivalent to the docker-compose args section as well.
Otherwise we'll get that added as soon as possible
Just a random note, I had a weird issue when openssl rand -base64 32 would generate strings containing \ backslashes, which wouldn't work nicely, make sure your string is only alphanumeric if possible.
Activity
GlitchWitch commentedon Jun 4, 2022
Potentially related to the following commit to the main repo from yesterday 10edc1f
krumware commentedon Jun 4, 2022
It looks like nextauth_secret was added to the base build requirements. @zomars can you confirm?
zomars commentedon Jun 4, 2022
Yes @krumware it is now a
next-authv4 requirement.krumware commentedon Jun 4, 2022
@GlitchWitch you should be able to follow the dockerfile and add the variable to the arg and env steps, then also add the equivalent to the docker-compose args section as well.
Otherwise we'll get that added as soon as possible
agustif commentedon Jun 4, 2022
Just a random note, I had a weird issue when
openssl rand -base64 32would generate strings containing \ backslashes, which wouldn't work nicely, make sure your string is only alphanumeric if possible.Software-Design commentedon Jun 6, 2022
If anyone else is searching for a "quick and dirty" solution until there is an update available:
Modifying the Dockerfile and adding the missing environment variables manually is a quick way to get it running for the moment:
krumware commentedon Jun 22, 2022
This should now be resolved, please see updated instructions!
gianlucagilardi commentedon Jun 24, 2022
Sorry to hijack the thread but since I am struggling with the stack network missing error may I ask you how you solved the issue at hand?
Thanks a lot!
G.