When I use npm run build in my local machine, it run. But when I try to pupblish in Netify, it cause error by this:
11:16:13 AM: yarn run v1.22.19
11:16:13 AM: $ docusaurus build
11:16:15 AM: [INFO] [en] Creating an optimized production build…
11:16:18 AM: [info] [webpackbar] Compiling Client
11:16:18 AM: [info] [webpackbar] Compiling Server
11:19:31 AM: Failed during stage “building site”: Build script returned non-zero exit code: 2
11:19:31 AM: Killed
11:19:31 AM: error Command failed with exit code 137. (Search results for '"non-zero exit code: 137"' - Netlify Support Forums)
11:19:31 AM: info Visit yarn run | Yarn for documentation about this command.
11:19:31 AM:
11:19:31 AM: “build.command” failed
11:19:31 AM: ────────────────────────────────────────────────────────────────
11:19:31 AM:
11:19:31 AM: Error message
11:19:31 AM: Command failed with exit code 137: yarn run build (Search results for '"non-zero exit code: 137"' - Netlify Support Forums)
11:19:31 AM:
11:19:31 AM: Error location
11:19:31 AM: In Build command from Netlify app:
11:19:31 AM: yarn run build
11:19:31 AM:
11:19:31 AM: Resolved config
11:19:31 AM: build:
11:19:31 AM: command: yarn run build
11:19:31 AM: commandOrigin: ui
11:19:31 AM: environment:
11:19:31 AM: - NEXT_PRIVATE_TARGET
11:19:31 AM: publish: /opt/build/repo/build
11:19:31 AM: publishOrigin: ui
11:19:31 AM: plugins:
11:19:31 AM: - inputs: {}
11:19:31 AM: origin: ui
11:19:31 AM: package: “@netlify/plugin-nextjs”
11:19:31 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
11:19:31 AM: Failing build: Failed to build site
11:19:32 AM: Finished processing build request in 5m52.42s
I was investigating about this problem, everyone tell me I net to change build option, like “max_old_space=4092”, I did’nt find somewhere that to set that,
can someone help me?