How to Build XO from Sources on Debian 10

Hi All and apologies if this topic is answered elsewhere.
I’m following Tom’s video on installing XenOrchestra on Debian 10 but my install does not go as smoothly as shown. I am constantly getting the following error multiple times:
ln: target ‘/opt/xo/xo-builds/xen-orchestra-202001091338/packages/xo-server/node_modules/’ is not a directory: No such file or directory
At which point the the xo-server tries to start but fails “waiting for port to open” . I assume these two are related.
I note another poster had a similar problem that was fixed in his pfSense firewall but I am not running pfSense anywhere and as far as I know there are no blocks on outgoing requests.

I have the basic Xen Orchestra (free version) running under which I have created a Debian 10 VM into which I am trying to do a full Xen Orchestra install following Tom’s YouTube Videos “How to build XO from Source on Debian 10” and " Getting Started Tutorial: Building An Open Source XCP-NG & Xen Orchestra Virtualization Lab".

Error log says:
Sep 01 13:52:23 XOA-Debian systemd[1]: Started XO Server.
Sep 01 13:52:23 XOA-Debian xo-server[6049]: internal/modules/cjs/loader.js:638
Sep 01 13:52:23 XOA-Debian xo-server[6049]: throw err;
Sep 01 13:52:23 XOA-Debian xo-server[6049]: ^
Sep 01 13:52:23 XOA-Debian xo-server[6049]: Error: Cannot find module ‘@xen-orchestra/log/configure’
Sep 01 13:52:23 XOA-Debian xo-server[6049]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
Sep 01 13:52:23 XOA-Debian xo-server[6049]: at Function.Module._load (internal/modules/cjs/loader.js:562:25)
Sep 01 13:52:23 XOA-Debian xo-server[6049]: at Module.require (internal/modules/cjs/loader.js:692:17)
Sep 01 13:52:23 XOA-Debian xo-server[6049]: at require (internal/modules/cjs/helpers.js:25:18)
Sep 01 13:52:23 XOA-Debian xo-server[6049]: at Object. (/opt/xo/xo-builds/xen-orchestra-202001091351/packages/xo-server/bin/xo-server:23:1)
Sep 01 13:52:23 XOA-Debian xo-server[6049]: at Module._compile (internal/modules/cjs/loader.js:778:30)
Sep 01 13:52:23 XOA-Debian xo-server[6049]: at Object.Module._extensions…js (internal/modules/cjs/loader.js:789:10)
Sep 01 13:52:23 XOA-Debian xo-server[6049]: at Module.load (internal/modules/cjs/loader.js:653:32)
Sep 01 13:52:23 XOA-Debian xo-server[6049]: at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
Sep 01 13:52:23 XOA-Debian xo-server[6049]: at Function.Module._load (internal/modules/cjs/loader.js:585:3)
Sep 01 13:52:23 XOA-Debian xo-server[6049]: at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
Sep 01 13:52:23 XOA-Debian xo-server[6049]: at startup (internal/bootstrap/node.js:283:19)
Sep 01 13:52:23 XOA-Debian xo-server[6049]: at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)

All help greatly appreciated.

Are you sure you are running the script as root?

Does it need root or is sudo good enough? That might be a reason that something I was trying failed if it really needs to be root user.

Yes, Definitely running as root. Running on Debian VM which won’t let me SSH in using root account. Thus I have to use my own account and then su root. I’ve double checked the history on my own account and the only program run is “su root”. So I’m sure I didn’t make that mistake.

I’ve install xcp-ng and then installed the default “free” Xen Orchestra from the default webpage on the xcp-ng host. I then used the default XenOrchestra VM to create a Debian VM into which I am attempting to install the self compiled version of XenOrchestra (using Tom’s YouTube videos mentioned). I have had a thought that perhaps I should be running the scripts directly on the host and not a VM (Debian) created by the default free XenOrchestra. But that doesn’t make sense for a video titled “Build XO from Sources on Debian”. Now getting confused. Thanks for any assistance.

BTW, my Debian 10 VM has 4 cores and 4GB RAM.

The only times I’ve done what you are doing, I installed Centos 7.7 and didn’t have any trouble getting it to work as a VM. I used XCP-NG Center from Windows to create the VM, then I normally install X-RDP and RDP into the Centos VM. Just the way I work.

Once I get settled in to the new semester, I’m going to install Centos on an HP T630 and just use that. Then I’ll always have a device that can connect, even if I wipe out XCP-NG and start from the beginning (it’s a lab so that happens fairly often).

SOLVED !!

The problem is with Node. The standard version available on Debian in V10 but the script wants version 12 which it tries to install. But the latest version of version 12 is 12.18.3 which is incompatible with my stock Debian 10 installation. My solution was to install v12.13.0, the first of the LTS versions, which was successful. I did try the latest (Sept 2020) v14.9.0 but that also failed.

Hope this helps others in this fluid (versions) situation.