My deploy/build has started failing again — this appears to be the same issue that occurred 2 weeks ago raised here:
- Mkdocs builds worked for past 2 months, now fails with: Command failed with exit code 127: mkdocs build
- Project that’s been stable for years has suddenly started failing “poetry: command not found”
Creating a new thread since those are marked as solved, and i didn’t get a response when commenting in the replies.
My config has not changed, it was working fine then spontaneously stopped as it did 2 weeks ago.
My project is built using mkdocs and deploys using poetry. Errors below:
1:04:18 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
1:04:18 PM: Writing lock file
1:04:18 PM: Installing the current project: XXX (1.0.0)
1:04:18 PM: Warning: The current project could not be installed: No file/folder found for package XXX
1:04:18 PM: If you do not want to install the current project use --no-root.
1:04:18 PM: If you want to use Poetry only for dependency management but not for packaging, you can disable package mode by setting package-mode = false in your pyproject.toml file.
1:04:18 PM: In a future version of Poetry this warning will become an error!
1:04:18 PM: bash: line 4: mkdocs: command not found
1:04:18 PM:
1:04:18 PM: "build.command" failed
1:04:18 PM: ────────────────────────────────────────────────────────────────
1:04:18 PM:
1:04:18 PM: Error message
1:04:18 PM: Command failed with exit code 127: pip3 install -q poetry && (https://ntl.fyi/exit-code-127)
1:04:18 PM: python -m poetry &&
1:04:18 PM: poetry config virtualenvs.in-project true &&
1:04:18 PM: poetry install -v &&
1:04:18 PM: mkdocs build
1:04:18 PM:
1:04:18 PM: Error location
1:04:18 PM: In build.command from netlify.toml:
1:04:18 PM: pip3 install -q poetry &&
1:04:18 PM: python -m poetry &&
1:04:18 PM: poetry config virtualenvs.in-project true &&
1:04:18 PM: poetry install -v &&
1:04:18 PM: mkdocs build
1:04:18 PM:
1:04:18 PM: Resolved config
1:04:18 PM: build:
1:04:18 PM: command: |
1:04:18 PM: pip3 install -q poetry &&
1:04:18 PM: python -m poetry &&
1:04:18 PM: poetry config virtualenvs.in-project true &&
1:04:18 PM: poetry install -v &&
1:04:18 PM: mkdocs build
1:04:18 PM: commandOrigin: config
1:04:18 PM: environment:
1:04:18 PM: - XXX
1:04:18 PM: publish: /opt/build/repo/site
1:04:18 PM: publishOrigin: config
1:04:18 PM: redirectsOrigin: config
1:04:18 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
1:04:18 PM: Failing build: Failed to build site
1:04:18 PM: Finished processing build request in 35.138s