Admin url: Netlify App
Site url: https://astounding-tulumba-e4dc2b.netlify.app
I have this error in the build process:
6:19:14 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2 (Search results for '"non-zero exit code: 2"' - Netlify Support Forums)
6:14:10 PM: Netlify Build
6:14:10 PM: ────────────────────────────────────────────────────────────────
6:14:10 PM:
6:14:10 PM: ❯ Version
6:14:10 PM: @netlify/build 29.20.12
6:14:10 PM:
6:14:10 PM: ❯ Flags
6:14:10 PM: baseRelDir: true
6:14:10 PM: buildId: 650482a3c3c0d94a069cae72
6:14:10 PM: deployId: 650482a3c3c0d94a069cae74
6:14:10 PM:
6:14:10 PM: ❯ Current directory
6:14:10 PM: /opt/build/repo
6:14:10 PM:
6:14:10 PM: ❯ Config file
6:14:10 PM: /opt/build/repo/netlify.toml
6:14:10 PM:
6:14:10 PM: ❯ Context
6:14:10 PM: production
6:14:10 PM:
6:14:10 PM: Build command from Netlify app
6:14:10 PM: ────────────────────────────────────────────────────────────────
6:14:10 PM:
6:14:10 PM: $ npm run build
6:14:11 PM: > text-to-speech-express@1.0.0 build
6:14:11 PM: > netlify deploy --prod
6:14:13 PM: Logging into your Netlify account…
6:14:13 PM: Opening Netlify App
6:14:13 PM: - Waiting for authorization…
6:19:13 PM: › Error: Timed out waiting for authorization. If you do not have a Netlify account, please create one at Netlify App, then run netlify login again.
6:19:13 PM:
6:19:13 PM: build.command failed
6:19:13 PM: ────────────────────────────────────────────────────────────────
6:19:13 PM:
6:19:13 PM: Error message
6:19:13 PM: Command failed with exit code 1: npm run build (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
6:19:13 PM:
6:19:13 PM: Error location
6:19:13 PM: In Build command from Netlify app:
6:19:13 PM: npm run build
6:19:13 PM:
6:19:13 PM: Resolved config
6:19:13 PM: build:
6:19:13 PM: command: npm run build
6:19:13 PM: commandOrigin: ui
6:19:13 PM: publish: /opt/build/repo/public
6:19:13 PM: publishOrigin: config
6:19:13 PM: functionsDirectory: /opt/build/repo/functions
6:19:14 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
6:19:14 PM: Failing build: Failed to build site
6:19:15 PM: Finished processing build request in 5m37.597s
My package.json:
{
“name”: “text-to-speech-express”,
“version”: “1.0.0”,
“description”: “”,
“main”: “functions/api.js”,
“type”: “module”,
“scripts”: {
“test”: “echo "Error: no test specified" && exit 1”,
“build”: “netlify deploy --prod”
},
“keywords”: ,
“author”: “”,
“license”: “ISC”,
“dependencies”: {
“@google-cloud/text-to-speech”: “^5.0.0”,
“axios”: “^1.5.0”,
“body-parser”: “^1.20.2”,
“dotenv”: “^16.3.1”,
“ejs”: “^3.1.9”,
“express”: “^4.18.2”,
“multer”: “^1.4.5-lts.1”,
“netlify-cli”: “^16.3.1”,
“netlify-lambda”: “^2.0.16”,
“node-fetch”: “^3.3.2”,
“openai”: “^4.0.0”,
“serverless-http”: “^3.2.0”
}
}
my netlify.toml:
[build]
publish = “public”
functions = “functions”