XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    A lot of not found and error 127 in yarn build

    Scheduled Pinned Locked Moved Solved Xen Orchestra
    17 Posts 5 Posters 4.1k Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B Offline
      bern
      last edited by

      I try to build xen orchestra from source by following the procedure at:
      https://xen-orchestra.com/docs/installation.html#from-the-sources

      The 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
      
      
      1 Reply Last reply Reply Quote 0
      • julien-fJ Offline
        julien-f Vates 🪐 Co-Founder XO Team @bern
        last edited by

        @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.

        B 1 Reply Last reply Reply Quote 1
        • DanpD Offline
          Danp Pro Support Team
          last edited by

          Did you issue the command yarn before issuing yarn build?

          B 1 Reply Last reply Reply Quote 0
          • B Offline
            bern @Danp
            last edited by

            @Danp yes I did ran yarn first

            1 Reply Last reply Reply Quote 0
            • olivierlambertO Offline
              olivierlambert Vates 🪐 Co-Founder CEO
              last edited by

              And what about your Node version?

              B 1 Reply Last reply Reply Quote 0
              • B Offline
                bern @olivierlambert
                last edited by

                @olivierlambert
                node -v
                v19.2.0

                I 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"

                1 Reply Last reply Reply Quote 0
                • olivierlambertO Offline
                  olivierlambert Vates 🪐 Co-Founder CEO
                  last edited by

                  Have you carefully read our documentation? There's a sentence in bold:

                  Please always use latest Node LTS.

                  That should be a good start 🙂

                  B 1 Reply Last reply Reply Quote 0
                  • B Offline
                    bern @olivierlambert
                    last edited by

                    I started from scratch with
                    node -v
                    v18.12.1

                    which 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

                    1 Reply Last reply Reply Quote 0
                    • olivierlambertO Offline
                      olivierlambert Vates 🪐 Co-Founder CEO
                      last edited by

                      Are you on the latest commit from master?

                      B 1 Reply Last reply Reply Quote 0
                      • B Offline
                        bern @olivierlambert
                        last edited by

                        I ran the command from the documentation:

                        git clone -b master https://github.com/vatesfr/xen-orchestra

                        julien-fJ 1 Reply Last reply Reply Quote 0
                        • olivierlambertO Offline
                          olivierlambert Vates 🪐 Co-Founder CEO
                          last edited by

                          Does it ring any bell @julien-f ?

                          1 Reply Last reply Reply Quote 0
                          • julien-fJ Offline
                            julien-f Vates 🪐 Co-Founder XO Team @bern
                            last edited by

                            @bern Don't forget the initial yarn to install the dependencies.

                            B 1 Reply Last reply Reply Quote 0
                            • B Offline
                              bern @julien-f
                              last edited by

                              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

                              julien-fJ 1 Reply Last reply Reply Quote 0
                              • julien-fJ Offline
                                julien-f Vates 🪐 Co-Founder XO Team @bern
                                last edited by

                                @bern My bad, I missed your previous message on this

                                I don't know where the issue comes from then 🤔

                                1 Reply Last reply Reply Quote 0
                                • B Offline
                                  bern
                                  last edited by

                                  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.1

                                  root@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.0

                                  git clone -b master https://github.com/vatesfr/xen-orchestra

                                  yarn

                                  yarn build

                                  It looks like I am out of luck on this. 😕

                                  AnonabharA julien-fJ 2 Replies Last reply Reply Quote 0
                                  • AnonabharA Offline
                                    Anonabhar @bern
                                    last edited by

                                    @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 -
                                    
                                    1 Reply Last reply Reply Quote 0
                                    • julien-fJ Offline
                                      julien-f Vates 🪐 Co-Founder XO Team @bern
                                      last edited by

                                      @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.

                                      B 1 Reply Last reply Reply Quote 1
                                      • B Offline
                                        bern @julien-f
                                        last edited by

                                        @julien-f It works!!!

                                        No more error in the yarn build output.

                                        Thanks a lot!

                                        1 Reply Last reply Reply Quote 1
                                        • olivierlambertO olivierlambert marked this topic as a question on
                                        • olivierlambertO olivierlambert has marked this topic as solved on

                                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                        With your input, this post could be even better 💗

                                        Register Login
                                        • First post
                                          Last post