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

Error: spawnSync git ENOENT #42

Open
arklanq opened this issue Mar 10, 2021 · 1 comment
Open

Error: spawnSync git ENOENT #42

arklanq opened this issue Mar 10, 2021 · 1 comment

Comments

@arklanq
Copy link

arklanq commented Mar 10, 2021

The following error occurs in Docker container when building production image:

#16 2.458 > Build error occurred
#16 2.461 <ref *1> Error: spawnSync git ENOENT
#16 2.461     at Object.spawnSync (internal/child_process.js:1067:20)
#16 2.461     at spawnSync (child_process.js:602:24)
#16 2.461     at Object.execFileSync (child_process.js:629:15)
#16 2.461     at gitSync (/build/node_modules/next-build-id/index.js:43:23)
#16 2.461     at AsyncFunction.nextBuildId.sync (/build/node_modules/next-build-id/index.js:170:8)
#16 2.461     at Object.<anonymous> (/build/next.config.js:9:32)
#16 2.461     at Module._compile (internal/modules/cjs/loader.js:1063:30)
#16 2.461     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
#16 2.461     at Module.load (internal/modules/cjs/loader.js:928:32)
#16 2.461     at Function.Module._load (internal/modules/cjs/loader.js:769:14)
#16 2.461     at Module.require (internal/modules/cjs/loader.js:952:19)
#16 2.461     at require (internal/modules/cjs/helpers.js:88:18)
#16 2.461     at loadConfig (/build/node_modules/next/dist/next-server/server/config.js:8:94)
#16 2.461     at /build/node_modules/next/dist/build/index.js:2:227
#16 2.461     at /build/node_modules/next/dist/build/tracer.js:3:360
#16 2.461     at NoopTracer.withSpan (/build/node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js:47:16) {
#16 2.461   errno: -2,
#16 2.461   code: 'ENOENT',
#16 2.461   syscall: 'spawnSync git',
#16 2.461   path: 'git',
#16 2.461   spawnargs: [
#16 2.461     '--git-dir=/build/.git',
#16 2.461     '--work-tree=/build',
#16 2.461     'rev-parse',
#16 2.461     'HEAD'
#16 2.461   ],
#16 2.461   error: [Circular *1],
#16 2.461   status: null,
#16 2.461   signal: null,
#16 2.461   output: null,
#16 2.461   pid: 39,
#16 2.461   stdout: null,
#16 2.461   stderr: null
#16 2.461 }
#16 2.486 error Command failed with exit code 1.
#16 2.486 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@chulphan
Copy link

chulphan commented Aug 5, 2021

If you using jenkins ELB then you could make .env.production.

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

No branches or pull requests

2 participants