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

    XOCE Yarn Start Error code 1

    Scheduled Pinned Locked Moved Solved Xen Orchestra
    13 Posts 3 Posters 887 Views 1 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.
    • M Offline
      mike.smith @Danp
      last edited by

      @danp Same exit code and error with some different stack information.

      yarn run v1.22.10
      $ node bin/xo-server
      internal/modules/cjs/loader.js:883
        throw err;
        ^
      
      Error: Cannot find module './dist/configure'
      Require stack:
      - /home/localtech/xen-orchestra/@xen-orchestra/log/configure.js
      - /home/localtech/xen-orchestra/packages/xo-server/bin/xo-server
          at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
          at Function.Module._load (internal/modules/cjs/loader.js:725:27)
          at Module.require (internal/modules/cjs/loader.js:952:19)
          at require (internal/modules/cjs/helpers.js:88:18)
          at Object.<anonymous> (/home/localtech/xen-orchestra/@xen-orchestra/log/configure.js:1:18)
          at Module._compile (internal/modules/cjs/loader.js:1063:30)
          at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
          at Module.load (internal/modules/cjs/loader.js:928:32)
          at Function.Module._load (internal/modules/cjs/loader.js:769:14)
          at Module.require (internal/modules/cjs/loader.js:952:19)
          at require (internal/modules/cjs/helpers.js:88:18)
          at Object.<anonymous> (/home/localtech/xen-orchestra/packages/xo-server/bin/xo-server:23:1)
          at Module._compile (internal/modules/cjs/loader.js:1063:30)
          at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
          at Module.load (internal/modules/cjs/loader.js:928:32)
          at Function.Module._load (internal/modules/cjs/loader.js:769:14) {
        code: 'MODULE_NOT_FOUND',
        requireStack: [
          '/home/localtech/xen-orchestra/@xen-orchestra/log/configure.js',
          '/home/localtech/xen-orchestra/packages/xo-server/bin/xo-server'
        ]
      }
      error Command failed with exit code 1.
      
      DanpD 1 Reply Last reply Reply Quote 0
      • DanpD Offline
        Danp Pro Support Team @mike.smith
        last edited by

        @mike-smith It's possible that a recent commit has led to this error. I know I updated my VM yesterday and didn't encounter this issue.

        1 Reply Last reply Reply Quote 0
        • M Offline
          mike.smith
          last edited by

          Did another pull and now I'm getting a little different error but with the same exit code.

          localtech@xoce:~/xen-orchestra/packages/xo-server$ yarn start
          yarn run v1.22.10
          $ node bin/xo-server
            app-conf /home/localtech/xen-orchestra/packages/xo-server/config.toml +0ms
            app-conf /home/localtech/.config/xo-server/config.z-auto.json +2ms
          2021-02-25T19:05:55.402Z xo:main INFO Configuration loaded.
          āœ– Cannot destructure property 'enabled' of 'config.blockedAtOptions' as it is undefined.
          TypeError: Cannot destructure property 'enabled' of 'config.blockedAtOptions' as it is undefined.
              at main (/home/localtech/xen-orchestra/packages/xo-server/src/index.js:691:13)
              at processTicksAndRejections (internal/process/task_queues.js:93:5)
          error Command failed with exit code 1.
          info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
          
          1 Reply Last reply Reply Quote 0
          • DanpD Offline
            Danp Pro Support Team
            last edited by

            Assuming you ran both yarn and yarn build commands prior to the yarn run correct?

            P.S. Just updated with the latest sources without encountering any issues

            1 Reply Last reply Reply Quote 0
            • M Offline
              mike.smith
              last edited by mike.smith

              Thanks for working on this. still getting the same error. I removed the entire xen-orchestra folder and pulled down the git repository again. yes, I did yarn then yarn build in the xen-orchestra folder. changed directory to xo-server then copied the sample config to the config.toml. Then ran yarn start

              localtech@xoce:~/xen-orchestra/packages/xo-server$ yarn start
              yarn run v1.22.10
              $ node bin/xo-server
                app-conf /home/localtech/xen-orchestra/packages/xo-server/config.toml +0ms
                app-conf /home/localtech/.config/xo-server/config.z-auto.json +2ms
              2021-02-25T19:34:50.814Z xo:main INFO Configuration loaded.
              āœ– Cannot destructure property 'enabled' of 'config.blockedAtOptions' as it is undefined.
              TypeError: Cannot destructure property 'enabled' of 'config.blockedAtOptions' as it is undefined.
                  at main (/home/localtech/xen-orchestra/packages/xo-server/src/index.js:691:13)
                  at processTicksAndRejections (internal/process/task_queues.js:93:5)
              error Command failed with exit code 1.
              info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
              
              1 Reply Last reply Reply Quote 0
              • M Offline
                mike.smith
                last edited by

                Destroyed the VM and started from scratch on Ubuntu 20.04LTS. I am still getting this error.

                localtech@xoce:~/xen-orchestra/packages/xo-server$ yarn start
                yarn run v1.22.10
                $ node bin/xo-server
                  app-conf /home/localtech/xen-orchestra/packages/xo-server/config.toml +0ms
                2021-02-25T21:03:37.047Z xo:main INFO Configuration loaded.
                āœ– Cannot destructure property 'enabled' of 'config.blockedAtOptions' as it is undefined.
                TypeError: Cannot destructure property 'enabled' of 'config.blockedAtOptions' as it is undefined.
                    at main (/home/localtech/xen-orchestra/packages/xo-server/src/index.js:691:13)
                    at processTicksAndRejections (internal/process/task_queues.js:93:5)
                error Command failed with exit code 1.
                info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
                localtech@xoce:~/xen-orchestra/packages/xo-server$ 
                localtech@xoce:~/xen-orchestra/packages/xo-server$ node --version
                v14.16.0
                
                1 Reply Last reply Reply Quote 0
                • M Offline
                  mike.smith
                  last edited by

                  Looks like I got it working.
                  the instructions. threw me off

                  $ cd packages/xo-server
                  $ cp sample.config.yaml .xo-server.yaml
                  

                  There are no .yaml files I instead did .toml and I did not touch the config.toml

                  DanpD 1 Reply Last reply Reply Quote 0
                  • DanpD Offline
                    Danp Pro Support Team @mike.smith
                    last edited by

                    @mike-smith Wondering where you found those instructions because the link you posted earlier doesn't refer to .yaml files.

                    1 Reply Last reply Reply Quote 0
                    • M Offline
                      mike.smith
                      last edited by

                      you are right. I had so many tabs open. https://vates.gitbooks.io/xen-orchestra/content/from_the_sources.html is where I got it from. sorry about that.

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

                        I wonder why this Gitbook URL is everywhere instead of our official doc at https://xen-orchestra.com/docs

                        I'll try to remove the old one.

                        1 Reply Last reply Reply Quote 0
                        • M Offline
                          mike.smith
                          last edited by

                          Again thanks everyone. you can mark this as solved. The step I was missing was the config step.

                          $ cd packages/xo-server
                          $ mkdir -p ~/.config/xo-server
                          $ cp sample.config.toml ~/.config/xo-server/config.toml
                          
                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post