Next.js Discord

Discord Forum

Build error

Unanswered
Carpenter ant posted this in #help-forum
Open in Discord
Carpenter antOP
When committing, a per-commit hook is configured that runs the command ' next build'.
This command causes an error when run

git -c user.useConfigOnly=true commit --quiet --allow-empty-message --file - yarn run v1.22.0 $ /Users/ohotnikovav/Documents/web/node_modules/.bin/lint-staged → No staged files match any configured task. Done in 0.71s. yarn run v1.22.0 $ next build - info Loaded env from /Users/ohotnikovav/Documents/web/.env Build error occurred TypeError: generate is not a function at generateBuildId (/Users/ohotnikovav/Documents/web/node_modules/next/dist/build/generate-build-id.js:12:25) at /Users/ohotnikovav/Documents/web/node_modules/next/dist/build/index.js:169:132 at Span.traceAsyncFn (/Users/ohotnikovav/Documents/web/node_modules/next/dist/trace/trace.js:103:26) at /Users/ohotnikovav/Documents/web/node_modules/next/dist/build/index.js:169:78 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Span.traceAsyncFn (/Users/ohotnikovav/Documents/web/node_modules/next/dist/trace/trace.js:103:20) at async build (/Users/ohotnikovav/Documents/web/node_modules/next/dist/build/index.js:145:29) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. husky - pre-commit hook exited with code 1 (error)

Next 13.4.2 / Nodejs 20

0 Replies