xo-server/bin doesn't exist after updating with yarn build.
-
There was a recent change that resulted in the launched module being renamed. You need to redo your service so that it loads
./dist/cli.mjs
instead of./bin/xo-server
-
@danp Thanks for your reply. Now I have run (based on these instructions )
However, I can't still reach the web UI of XO
yarn global add forever yarn global add forever-service # Be sure to edit the path below to where your install is located! cd /home/username/xen-orchestra/packages/xo-server/ # Change the username below to the user owning XO forever-service install orchestra -r username -s dist/cli.mjs
Or should I redo my service in another way?
Now the output of systemctl status orchestra is:
mex@xo-community:~/xen-orchestra/packages/xo-server$ sudo service orchestra status ā orchestra.service - LSB: forever-service startup script for orchestra Loaded: loaded (/etc/init.d/orchestra; generated) Active: active (exited) since Tue 2021-06-29 09:01:08 CEST; 4s ago Docs: man:systemd-sysv-generator(8) Process: 1857 ExecStart=/etc/init.d/orchestra start (code=exited, status=0/SUCCESS) Jun 29 09:01:08 xo-community systemd[1]: Starting LSB: forever-service startup script for orchestra... Jun 29 09:01:08 xo-community orchestra[1857]: (node:1861) Warning: Accessing non-existent property 'padLevels' of module exports inside c Jun 29 09:01:08 xo-community orchestra[1857]: (Use `node --trace-warnings ...` to show where the warning was created) Jun 29 09:01:08 xo-community orchestra[1857]: (node:1861) Warning: Accessing non-existent property 'padLevels' of module exports inside c Jun 29 09:01:08 xo-community orchestra[1857]: Service orchestra already running Jun 29 09:01:08 xo-community systemd[1]: Started LSB: forever-service startup script for orchestra.
-
@runevn Is the web interface now accessible? FWIW I'm not familiar with
forever
, so I can't help any further on this. -
@danp unfortunately no.
-
@danp said in xo-server/bin doesn't exist after updating with yarn build.:
I'm not familiar with forever, so I can't help any further on this.
May I ask, if you do not use forever how would you then redo the service?
Thanks for your help.
-
-
@danp I have just deleted the forever-service and reinstalled it but it didn't help. I can't still access the Web UI.
I still get this status message
mex@xo-community:~/xen-orchestra/packages/xo-server$ sudo service orchestra status ā orchestra.service - LSB: forever-service startup script for orchestra Loaded: loaded (/etc/init.d/orchestra; generated) Active: active (exited) since Tue 2021-06-29 11:52:21 CEST; 3s ago Docs: man:systemd-sysv-generator(8) Process: 30529 ExecStart=/etc/init.d/orchestra start (code=exited, status=0/SUCCESS) Jun 29 11:52:21 xo-community systemd[1]: Starting LSB: forever-service startup script for orchestra... Jun 29 11:52:21 xo-community orchestra[30529]: (node:30533) Warning: Accessing non-existent property 'padLevels' of module exports inside Jun 29 11:52:21 xo-community orchestra[30529]: (Use `node --trace-warnings ...` to show where the warning was created) Jun 29 11:52:21 xo-community orchestra[30529]: (node:30533) Warning: Accessing non-existent property 'padLevels' of module exports inside Jun 29 11:52:21 xo-community orchestra[30529]: Starting orchestra Jun 29 11:52:21 xo-community orchestra[30529]: (node:30550) Warning: Accessing non-existent property 'padLevels' of module exports inside Jun 29 11:52:21 xo-community orchestra[30529]: (Use `node --trace-warnings ...` to show where the warning was created) Jun 29 11:52:21 xo-community orchestra[30529]: (node:30550) Warning: Accessing non-existent property 'padLevels' of module exports inside Jun 29 11:52:21 xo-community systemd[1]: Started LSB: forever-service startup script for orchestra.
-
What's your Node version? Post the output of
node -v
. You should be on v14.17.1. -
@danp said in xo-server/bin doesn't exist after updating with yarn build.:
What's your Node version? Post the output of
node -v
. You should be on v14.17.1.Yes
mex@xo-community:~/xen-orchestra/packages/xo-server$ node -v v14.17.1
Again, thanks for your replies.
-
@runevn said in xo-server/bin doesn't exist after updating with yarn build.:
Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
-
Does this means that XO can't find its own module or is it node's module?
mex@xo-community:~$ node --trace-warnings ... internal/modules/cjs/loader.js:905 throw err; ^ Error: Cannot find module '/home/mex/...' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15) at Function.Module._load (internal/modules/cjs/loader.js:746:27) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12) at internal/main/run_main_module.js:17:47 { code: 'MODULE_NOT_FOUND', requireStack: [] }
-
-
@danp said in xo-server/bin doesn't exist after updating with yarn build.:
@runevn IDK. Maybe @julien-f can suggest a solution for this.
But thank you for your effort! I really appreciate it.
-
@runevn Don't know much about
forever
, in the meantime, you can try to runxo-server
manually:> cd packages/xo-server > ./dist/cli.mjs
-
@julien-f said in xo-server/bin doesn't exist after updating with yarn build.:
@runevn Don't know much about
forever
, in the meantime, you can try to runxo-server
manually:> cd packages/xo-server > ./dist/cli.mjs
Thanks for your reply @julien-f . When I manually run xo-server it still doesn't work. Here is the output
mex@xo-community:~/xen-orchestra/packages/xo-server$ sudo ./dist/cli.mjs (node:65352) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension. (Use `node --trace-warnings ...` to show where the warning was created) /home/mex/xen-orchestra/packages/xo-server/dist/xapi/mixins/index.js:2 import _gpu, * as __gpu from "./gpu"; ^^^^^^ SyntaxError: Cannot use import statement outside a module at wrapSafe (internal/modules/cjs/loader.js:1001:16) at Module._compile (internal/modules/cjs/loader.js:1049:27) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10) at Module.load (internal/modules/cjs/loader.js:950:32) at Function.Module._load (internal/modules/cjs/loader.js:790:14) at ModuleWrap.<anonymous> (internal/modules/esm/translators.js:199:29) at ModuleJob.run (internal/modules/esm/module_job.js:169:25) at async Loader.import (internal/modules/esm/loader.js:177:24) at async Object.loadESM (internal/process/esm_loader.js:68:5) mex@xo-community:~/xen-orchestra/packages/xo-server$
Is there any other information that I can provide?
-
-
git clean -d -f
should work to remove any untracked files. -
-
@danp No, those are generated files.
Unfortunately they are not cleaned-up automatically but hopefully this won't happen too often
-
@julien-f and @Danp thanks a lot for your help! Now it works if I manually run cli.mjs
mex@xo-community:~/xen-orchestra/packages/xo-server$ sudo ./dist/cli.mjs 2021-06-30T06:21:41.457Z xo:main INFO Configuration loaded. 2021-06-30T06:21:41.478Z xo:main INFO Web server listening on http://[::]:80 2021-06-30T06:21:41.924Z xo:main INFO Setting up / ā /home/mex/xen-orchestra/packages/xo-web/dist
However, what should I do to recreate the service to start on boot. When setting up and using forever as described here. I'm still not able to load the web interface.
It seems that the service starts and is active
mex@xo-community:~/xen-orchestra/packages/xo-server$ sudo service orchestra status ā orchestra.service - LSB: forever-service startup script for orchestra Loaded: loaded (/etc/init.d/orchestra; generated) Active: active (exited) since Wed 2021-06-30 08:28:05 CEST; 3min 15s ago Docs: man:systemd-sysv-generator(8) Process: 1141 ExecStart=/etc/init.d/orchestra start (code=exited, status=0/SUCCESS) Jun 30 08:28:04 xo-community systemd[1]: Starting LSB: forever-service startup script for orchestra... Jun 30 08:28:05 xo-community orchestra[1141]: (node:1145) Warning: Accessing non-existent property 'padLevels' of module exports inside c Jun 30 08:28:05 xo-community orchestra[1141]: (Use `node --trace-warnings ...` to show where the warning was created) Jun 30 08:28:05 xo-community orchestra[1141]: (node:1145) Warning: Accessing non-existent property 'padLevels' of module exports inside c Jun 30 08:28:05 xo-community orchestra[1141]: Starting orchestra Jun 30 08:28:05 xo-community orchestra[1141]: (node:1162) Warning: Accessing non-existent property 'padLevels' of module exports inside c Jun 30 08:28:05 xo-community orchestra[1141]: (Use `node --trace-warnings ...` to show where the warning was created) Jun 30 08:28:05 xo-community orchestra[1141]: (node:1162) Warning: Accessing non-existent property 'padLevels' of module exports inside c Jun 30 08:28:05 xo-community systemd[1]: Started LSB: forever-service startup script for orchestra.