A lot of not found and error 127 in yarn build
-
I try to build xen orchestra from source by following the procedure at:
https://xen-orchestra.com/docs/installation.html#from-the-sourcesThe command "yarn build" return a lot of "not found" and error 127 as you could see below from the output of "yarn build".
What could be the problem?
Thanks
* xapi-explore-sr:prebuild − rimraf dist/ * xen-api:prebuild − rimraf dist/ /bin/sh: 1: rimraf: not found * xapi-explore-sr:prebuild − Error: 127 * xapi-explore-sr:build − cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/ * xen-api:prebuild − Error: 127 * xen-api:build − cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/ * xapi-explore-sr:build − Error: 127 * xo-collection:prebuild − rimraf dist/ /bin/sh: 1: cross-env: not found * xen-api:build − Error: 127 * xo-import-servers-csv:build − tsc * xo-collection:prebuild − Error: 127 * xo-collection:build − cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/ /bin/sh: 1: cross-env: not found * xo-collection:build − Error: 127 * xo-lib:prebuild − rimraf dist/ /bin/sh: 1: rimraf: not found * xo-lib:prebuild − Error: 127 * xo-lib:build − cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/ /bin/sh: 1: cross-env: not found * xo-lib:build − Error: 127 * xo-remote-parser:prebuild − rimraf dist/ /bin/sh: 1: rimraf: not found * xo-remote-parser:prebuild − Error: 127 * xo-remote-parser:build − cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/ /bin/sh: 1: cross-env: not found * xo-remote-parser:build − Error: 127 * xo-server:build − cross-env NODE_ENV=production yarn run _build /bin/sh: 1: cross-env: not found * xo-server:build − Error: 127 * xo-server-audit:prebuild − rimraf dist/ /bin/sh: 1: rimraf: not found * xo-server-audit:prebuild − Error: 127 * xo-server-audit:build − cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/ /bin/sh: 1: cross-env: not found * xo-server-audit:build − Error: 127 * xo-server-auth-github:build − NODE_ENV=production babel --source-maps --out-dir=dist/ src/ /bin/sh: 1: babel: not found * xo-server-auth-github:build − Error: 127 * xo-server-auth-google:prebuild − rimraf dist/ /bin/sh: 1: rimraf: not found * xo-server-auth-google:prebuild − Error: 127 * xo-server-auth-google:build − cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/ /bin/sh: 1: cross-env: not found * xo-server-auth-google:build − Error: 127 * xo-server-auth-ldap:prebuild − rimraf dist/ /bin/sh: 1: rimraf: not found * xo-server-auth-ldap:prebuild − Error: 127 * xo-server-auth-ldap:build − cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/ /bin/sh: 1: cross-env: not found * xo-server-auth-ldap:build − Error: 127 * xo-server-auth-saml:prebuild − yarn run clean * xo-server-auth-saml:build − cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/ /bin/sh: 1: cross-env: not found * xo-server-auth-saml:build − Error: 127 * xo-server-backup-reports:prebuild − yarn run clean * xo-server-backup-reports:build − cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/ /bin/sh: 1: cross-env: not found * xo-server-backup-reports:build − Error: 127 * xo-server-load-balancer:build − NODE_ENV=production babel --source-maps --out-dir=dist/ src/ /bin/sh: 1: babel: not found * xo-server-load-balancer:build − Error: 127 * xo-server-netbox:prebuild − rimraf dist/ /bin/sh: 1: rimraf: not found * xo-server-netbox:prebuild − Error: 127 * xo-server-netbox:build − cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/ /bin/sh: 1: cross-env: not found * xo-server-netbox:build − Error: 127 * xo-server-perf-alert:prebuild − yarn run clean * xo-server-perf-alert:build − cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/ /bin/sh: 1: cross-env: not found * xo-server-perf-alert:build − Error: 127 * xo-server-sdn-controller:prebuild − rimraf dist/ /bin/sh: 1: rimraf: not found * xo-server-sdn-controller:prebuild − Error: 127 * xo-server-sdn-controller:build − cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/ /bin/sh: 1: cross-env: not found * xo-server-sdn-controller:build − Error: 127 * xo-server-transport-email:prebuild − rimraf dist/ /bin/sh: 1: rimraf: not found * xo-server-transport-email:prebuild − Error: 127 * xo-server-transport-email:build − cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/ /bin/sh: 1: cross-env: not found * xo-server-transport-email:build − Error: 127 * xo-server-transport-icinga2:prebuild − rimraf dist/ /bin/sh: 1: rimraf: not found * xo-server-transport-icinga2:prebuild − Error: 127 * xo-server-transport-icinga2:build − cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/ /bin/sh: 1: cross-env: not found * xo-server-transport-icinga2:build − Error: 127 * xo-server-transport-nagios:prebuild − yarn run clean * xo-server-transport-nagios:build − cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/ /bin/sh: 1: cross-env: not found * xo-server-transport-nagios:build − Error: 127 * xo-server-transport-slack:prebuild − yarn run clean * xo-server-transport-slack:build − cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/ /bin/sh: 1: cross-env: not found * xo-server-transport-slack:build − Error: 127 * xo-server-transport-xmpp:prebuild − yarn run clean * xo-server-transport-xmpp:build − cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/ /bin/sh: 1: cross-env: not found * xo-server-transport-xmpp:build − Error: 127 * xo-server-usage-report:prebuild − yarn run clean * xo-server-usage-report:build − cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/ /bin/sh: 1: cross-env: not found * xo-server-usage-report:build − Error: 127 * xo-server-web-hooks:prebuild − rimraf dist/ /bin/sh: 1: rimraf: not found * xo-server-web-hooks:prebuild − Error: 127 * xo-server-web-hooks:build − cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/ /bin/sh: 1: cross-env: not found * xo-server-web-hooks:build − Error: 127 * xo-vmdk-to-vhd:prebuild − yarn run clean * xo-web:prebuild − yarn run clean && index-modules --auto src * xo-vmdk-to-vhd:build − cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/ /bin/sh: 1: cross-env: not found * xo-vmdk-to-vhd:build − Error: 127 * @xen-orchestra/fs:prebuild − yarn run clean [08:32:55] Using gulpfile /opt/xen-orchestra/packages/xo-web/gulpfile.js [08:32:55] Starting 'clean'... [08:32:55] Finished 'clean' after 29 ms /bin/sh: 1: index-modules: not found * xo-web:prebuild − Error: 127 * xo-web:build − GIT_HEAD=$(git rev-parse HEAD) NODE_ENV=production gulp build /bin/sh: 1: gulp: not found * xo-web:build − Error: 127 * @xen-orchestra/lite:build − run-p type-check build-only /bin/sh: 1: run-p: not found * @xen-orchestra/lite:build − Error: 127 * @xen-orchestra/openflow:prebuild − rimraf dist/ /bin/sh: 1: rimraf: not found * @xen-orchestra/openflow:prebuild − Error: 127 * @xen-orchestra/openflow:build − cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/ /bin/sh: 1: cross-env: not found * @xen-orchestra/openflow:build − Error: 127 * @xen-orchestra/upload-ova:prebuild − rimraf dist/ /bin/sh: 1: rimraf: not found * @xen-orchestra/upload-ova:prebuild − Error: 127 * @xen-orchestra/upload-ova:build − cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/ /bin/sh: 1: cross-env: not found * @xen-orchestra/upload-ova:build − Error: 127 * @xen-orchestra/fs:build − cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/ /bin/sh: 1: cross-env: not found * @xen-orchestra/fs:build − Error: 127 ✖ 45
-
@bern I believe the issue is that you are using Yarn 3 but XO is using Yarn 1 (classic).
I've made a change that should help with this, please fetch latest XO commit and try again
yarn
. -
Did you issue the command
yarn
before issuingyarn build
? -
@Danp yes I did ran yarn first
-
And what about your Node version?
-
@olivierlambert
node -v
v19.2.0I don't know if it is related but in the output if yarn, there is a lot of :
something "can't be found in the cache and will be fetched from the remote registry" -
Have you carefully read our documentation? There's a sentence in bold:
Please always use latest Node LTS.
That should be a good start
-
I started from scratch with
node -v
v18.12.1which is the latest LTS according to https://nodejs.org/en/
And I have the same errors.
I am on the same OS as the documentation:
lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye -
Are you on the latest commit from
master
? -
I ran the command from the documentation:
git clone -b master https://github.com/vatesfr/xen-orchestra
-
Does it ring any bell @julien-f ?
-
@bern Don't forget the initial
yarn
to install the dependencies. -
Here are the commands from my history:
116 git clone -b master https://github.com/vatesfr/xen-orchestra
. . .
119 cd xen-orchestra/
. . .
121 yarn
122 yarn build -
@bern My bad, I missed your previous message on this
I don't know where the issue comes from then
-
I reverted to a snapshot of a freshly installed Debian 11 and then I ran the following commands:
apt-get install build-essential redis-server libpng-dev git python3-minimal libvhdi-utils lvm2 cifs-utils
apt-get update
curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && apt-get install -y nodejs
root@orchestrator:~# node -v
v18.12.1root@orchestrator:~# which yarn
root@orchestrator:~# corepack enable
root@orchestrator:~# corepack prepare yarn@stable --activate
Preparing yarn@stable for immediate activation...
root@orchestrator:~# which yarn
/usr/bin/yarn
root@orchestrator:/opt/xen-orchestra# yarn -v
3.3.0git clone -b master https://github.com/vatesfr/xen-orchestra
yarn
yarn build
It looks like I am out of luck on this.
-
@bern I just built mine on Dev 11 a few days ago...
Make sure sudo is installed and do:
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
-
@bern I believe the issue is that you are using Yarn 3 but XO is using Yarn 1 (classic).
I've made a change that should help with this, please fetch latest XO commit and try again
yarn
. -
-
-