Currently i want to deploy Ghost with Netlify (with GitHub as a repository), but i found this detail error that NPM can not found the root at my workspace.
If you have any reference or input, i’m here to listen.
Please help me.
Thank you.
7:27:25 PM: Section completed: initializing
7:27:26 PM:
7:27:26 PM: Netlify Build
7:27:26 PM: ────────────────────────────────────────────────────────────────
7:27:26 PM:
7:27:26 PM: ❯ Version
7:27:26 PM: @netlify/build 29.9.0
7:27:26 PM:
7:27:26 PM: ❯ Flags
7:27:26 PM: baseRelDir: true
7:27:26 PM: buildId: 6426d1516771f21bd524f90f
7:27:26 PM: deployId: 6426d1516771f21bd524f911
7:27:26 PM:
7:27:26 PM: ❯ Current directory
7:27:26 PM: /opt/build/repo/current
7:27:26 PM:
7:27:26 PM: ❯ Config file
7:27:26 PM: No config file was defined: using default values.
7:27:26 PM:
7:27:26 PM: ❯ Context
7:27:26 PM: production
7:27:26 PM:
7:27:26 PM: 1. Build command from Netlify app
7:27:26 PM: ────────────────────────────────────────────────────────────────
7:27:26 PM:
7:27:26 PM: $ CI= npm run build
7:27:26 PM: > ghost@5.37.0 build
7:27:26 PM: > npm pack --pack-destination …/…
7:27:27 PM: > ghost@5.37.0 prepack
7:27:27 PM: > yarn workspace ghost-admin run build:prod && yarn build:css && npx --yes daniellockyer/monobundle
7:27:27 PM: yarn workspace v1.22.19
7:27:27 PM: error Cannot find the root of your workspace - are you sure you’re currently in a workspace?
info Visit yarn workspace | Yarn for documentation about this command.
7:27:27 PM: npm ERR! code 1
7:27:27 PM: npm ERR! path /opt/build/repo/current
7:27:27 PM: npm ERR! command failed
7:27:27 PM: npm ERR! command sh -c – yarn workspace ghost-admin run build:prod && yarn build:css && npx --yes daniellockyer/monobundle
7:27:27 PM: npm ERR! A complete log of this run can be found in:
7:27:27 PM: npm ERR! /opt/buildhome/.npm/_logs/2023-03-31T12_27_26_994Z-debug-0.log
7:27:27 PM:
7:27:27 PM: “build.command” failed
7:27:27 PM: ────────────────────────────────────────────────────────────────
7:27:27 PM:
7:27:27 PM: Error message
7:27:27 PM: Command failed with exit code 1: CI= npm run build (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
7:27:27 PM:
7:27:27 PM: Error location
7:27:27 PM: In Build command from Netlify app:
7:27:27 PM: CI= npm run build
7:27:27 PM:
7:27:27 PM: Resolved config
7:27:27 PM: build:
7:27:27 PM: base: /opt/build/repo/current
7:27:27 PM: command: CI= npm run build
7:27:27 PM: commandOrigin: ui
7:27:27 PM: environment:
7:27:27 PM: - CI
7:27:27 PM: publish: /opt/build/repo/current/build
7:27:27 PM: publishOrigin: ui
7:27:27 PM: Caching artifacts
7:27:27 PM: Started saving node modules
7:27:27 PM: Finished saving node modules
7:27:27 PM: Started saving build plugins
7:27:27 PM: Finished saving build plugins
7:27:27 PM: Started saving corepack cache
7:27:27 PM: Finished saving corepack cache
7:27:27 PM: Started saving yarn cache
7:27:35 PM: Finished saving yarn cache
7:27:35 PM: Started saving pip cache
7:27:35 PM: Finished saving pip cache
7:27:35 PM: Started saving emacs cask dependencies
7:27:35 PM: Finished saving emacs cask dependencies
7:27:35 PM: Started saving maven dependencies
7:27:35 PM: Finished saving maven dependencies
7:27:35 PM: Started saving boot dependencies
7:27:35 PM: Finished saving boot dependencies
7:27:35 PM: Started saving rust rustup cache
7:27:35 PM: Finished saving rust rustup cache
7:27:35 PM: Started saving go dependencies
7:27:35 PM: Finished saving go dependencies
7:27:35 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
7:27:35 PM: Failing build: Failed to build site
7:27:35 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)
7:27:36 PM: Finished processing build request in 1m38.51s