XOCE Yarn Start Error code 1
-
Started from scratch on Ubuntu 20.04LTS and I have tried different versions of nodeJS 10 and 14 LTS versions. Currently, I am running nodejs 10.24.0. When I run the yarn start command in xo-server folder I get the following cannot find module error. I followed the commands from https://xen-orchestra.com/docs/from_the_sources.html Any help would be appreciated.
yarn run v1.22.10 $ node bin/xo-server internal/modules/cjs/loader.js:638 throw err; ^ Error: Cannot find module './dist/configure' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) at Function.Module._load (internal/modules/cjs/loader.js:562:25) at Module.require (internal/modules/cjs/loader.js:692:17) at require (internal/modules/cjs/helpers.js:25:18) at Object.<anonymous> (/home/localtech/xen-orchestra/@xen-orchestra/log/configure.js:1:18) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Module.require (internal/modules/cjs/loader.js:692:17) at require (internal/modules/cjs/helpers.js:25:18) at Object.<anonymous> (/home/localtech/xen-orchestra/packages/xo-server/bin/xo-server:23:1) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
-
A recent change indicates that Node 14 LTS is now a requirement.
https://github.com/vatesfr/xen-orchestra/commit/981193ed231e98ac81f50dbab0d9d82dd929cf73
-
@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.
-
@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.
-
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.
-
Assuming you ran both
yarn
andyarn build
commands prior to theyarn run
correct?P.S. Just updated with the latest sources without encountering any issues
-
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.
-
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
-
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
-
@mike-smith Wondering where you found those instructions because the link you posted earlier doesn't refer to .yaml files.
-
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.
-
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.
-
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