Jarli01 / xenorchestra_installer

A simple install script for Xen Orchestra
GNU General Public License v3.0
428 stars 86 forks source link

Node v10 release - unable to build #12

Closed GeekBoxIT closed 6 years ago

GeekBoxIT commented 6 years ago

Expected Behavior

New install of XOCE in a fresh Ubuntu 17.10 minimal VM on XCP-ng


Actual Behavior

Error:

yarn install v1.6.0
(node:8995) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info fsevents@1.1.3: The platform "linux" is incompatible with this module.
info "fsevents@1.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
error upath@1.0.4: The engine "node" is incompatible with this module. Expected version ">=4 <=9".
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
yarn run v1.6.0
(node:9024) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
$ scripts/run-script --parallel build
internal/modules/cjs/loader.js:573
    throw err;
    ^

Error: Cannot find module 'promise-toolbox'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:571:15)
    at Function.Module._load (internal/modules/cjs/loader.js:497:25)
    at Module.require (internal/modules/cjs/loader.js:626:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/opt/xen-orchestra/scripts/run-script:4:32)
    at Module._compile (internal/modules/cjs/loader.js:678:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
    at Module.load (internal/modules/cjs/loader.js:589:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
    at Function.Module._load (internal/modules/cjs/loader.js:520:3)
error Command failed with exit code 1.

Confirm XOCE services are running

systemctl status xo-server.service Failed.

Provide the output of journalctl logs

journalctl -u xo-server -f -n 50

-- Logs begin at Wed 2018-04-25 11:45:47 EDT. --
Apr 25 11:57:25 xoa2 systemd[1]: Started XO Server.
Apr 25 11:57:26 xoa2 xo-server[9094]: internal/modules/cjs/loader.js:573
Apr 25 11:57:26 xoa2 xo-server[9094]:     throw err;
Apr 25 11:57:26 xoa2 xo-server[9094]:     ^
Apr 25 11:57:26 xoa2 xo-server[9094]: Error: Cannot find module 'bluebird'
Apr 25 11:57:26 xoa2 xo-server[9094]:     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:571:15)
Apr 25 11:57:26 xoa2 xo-server[9094]:     at Function.Module._load (internal/modules/cjs/loader.js:497:25)
Apr 25 11:57:26 xoa2 xo-server[9094]:     at Module.require (internal/modules/cjs/loader.js:626:17)
Apr 25 11:57:26 xoa2 xo-server[9094]:     at require (internal/modules/cjs/helpers.js:20:18)
Apr 25 11:57:26 xoa2 xo-server[9094]:     at Object.<anonymous> (/opt/xen-orchestra/packages/xo-server/bin/xo-server:12:18)
Apr 25 11:57:26 xoa2 xo-server[9094]:     at Module._compile (internal/modules/cjs/loader.js:678:30)
Apr 25 11:57:26 xoa2 xo-server[9094]:     at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
Apr 25 11:57:26 xoa2 xo-server[9094]:     at Module.load (internal/modules/cjs/loader.js:589:32)
Apr 25 11:57:26 xoa2 xo-server[9094]:     at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
Apr 25 11:57:26 xoa2 xo-server[9094]:     at Function.Module._load (internal/modules/cjs/loader.js:520:3)
Apr 25 11:57:26 xoa2 xo-server[9094]:     at Function.Module.runMain (internal/modules/cjs/loader.js:719:10)
Apr 25 11:57:26 xoa2 xo-server[9094]:     at startup (internal/bootstrap/node.js:228:19)
Apr 25 11:57:26 xoa2 xo-server[9094]:     at bootstrapNodeJSCore (internal/bootstrap/node.js:575:3)
Apr 25 11:57:26 xoa2 systemd[1]: xo-server.service: Main process exited, code=exited, status=1/FAILURE
Apr 25 11:57:26 xoa2 systemd[1]: xo-server.service: Unit entered failed state.
Apr 25 11:57:26 xoa2 systemd[1]: xo-server.service: Failed with result 'exit-code'.
Apr 25 11:57:26 xoa2 systemd[1]: xo-server.service: Service hold-off time over, scheduling restart.
Apr 25 11:57:26 xoa2 systemd[1]: Stopped XO Server.
Apr 25 11:57:26 xoa2 systemd[1]: Started XO Server.
Apr 25 11:57:26 xoa2 xo-server[9100]: internal/modules/cjs/loader.js:573
Apr 25 11:57:26 xoa2 xo-server[9100]:     throw err;
Apr 25 11:57:26 xoa2 xo-server[9100]:     ^
Apr 25 11:57:26 xoa2 xo-server[9100]: Error: Cannot find module 'bluebird'
Apr 25 11:57:26 xoa2 xo-server[9100]:     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:571:15)
Apr 25 11:57:26 xoa2 xo-server[9100]:     at Function.Module._load (internal/modules/cjs/loader.js:497:25)
Apr 25 11:57:26 xoa2 xo-server[9100]:     at Module.require (internal/modules/cjs/loader.js:626:17)
Apr 25 11:57:26 xoa2 xo-server[9100]:     at require (internal/modules/cjs/helpers.js:20:18)
Apr 25 11:57:26 xoa2 xo-server[9100]:     at Object.<anonymous> (/opt/xen-orchestra/packages/xo-server/bin/xo-server:12:18)
Apr 25 11:57:26 xoa2 xo-server[9100]:     at Module._compile (internal/modules/cjs/loader.js:678:30)
Apr 25 11:57:26 xoa2 xo-server[9100]:     at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
Apr 25 11:57:26 xoa2 xo-server[9100]:     at Module.load (internal/modules/cjs/loader.js:589:32)
Apr 25 11:57:26 xoa2 xo-server[9100]:     at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
Apr 25 11:57:26 xoa2 xo-server[9100]:     at Function.Module._load (internal/modules/cjs/loader.js:520:3)
Apr 25 11:57:26 xoa2 xo-server[9100]:     at Function.Module.runMain (internal/modules/cjs/loader.js:719:10)
Apr 25 11:57:26 xoa2 xo-server[9100]:     at startup (internal/bootstrap/node.js:228:19)
Apr 25 11:57:26 xoa2 xo-server[9100]:     at bootstrapNodeJSCore (internal/bootstrap/node.js:575:3)
Apr 25 11:57:26 xoa2 systemd[1]: xo-server.service: Main process exited, code=exited, status=1/FAILURE
Apr 25 11:57:26 xoa2 systemd[1]: xo-server.service: Unit entered failed state.
Apr 25 11:57:26 xoa2 systemd[1]: xo-server.service: Failed with result 'exit-code'.
Apr 25 11:57:26 xoa2 systemd[1]: xo-server.service: Service hold-off time over, scheduling restart.
Apr 25 11:57:26 xoa2 systemd[1]: Stopped XO Server.
Apr 25 11:57:26 xoa2 systemd[1]: xo-server.service: Start request repeated too quickly.
Apr 25 11:57:26 xoa2 systemd[1]: Failed to start XO Server.
Apr 25 11:57:26 xoa2 systemd[1]: xo-server.service: Unit entered failed state.
Apr 25 11:57:26 xoa2 systemd[1]: xo-server.service: Failed with result 'exit-code'.

Provide answers to these questions:

Fresh install, XCP-ng, script install

Jarli01 commented 6 years ago

Can you provide the link to the ISO you used?

Jarli01 commented 6 years ago

The fact that you're on XCP-ng should be moot as the installation process is contained within the VM.

A few follow up questions:

Did you perform all system updates? Did you run the installation process as outlined in the readme? (Just confirming you followed the installation process as outlined in the readme).

Danp2 commented 6 years ago

error upath@1.0.4: The engine "node" is incompatible with this module. Expected version ">=4 <=9".

Please post the output of node -v. Once you confirm that it is greater than 9, then suggest that you revert using sudo n LTS

Jarli01 commented 6 years ago

I have Node version 9.10.1 on a working 17.10 system here. Something else is causing this.

Danp2 commented 6 years ago

Are you able to duplicate the issue? If not, then I suspect he is on Node 10.x

Jarli01 commented 6 years ago

I was hoping OP would respond to my questions before I had to go and test again.

But I just went through this process the other day for another issue on ML and it worked without issue.

Danp2 commented 6 years ago

Right. It's possible that something changed in one of the upstream packages, but IMO more likely that they installed using some method other than this script.

GeekBoxIT commented 6 years ago

Sorry guys, Mobile. Will answer as soon as I get back to office.

-- Erick Smith

On Apr 25, 2018, at 1:34 PM, Dustin B notifications@github.com wrote:

I was hoping OP would respond to my questions before I had to go and test again.

But I just went through this process the other day for another issue on ML and it worked without issue.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Jarli01/xenorchestra_installer/issues/12#issuecomment-384370662, or mute the thread https://github.com/notifications/unsubscribe-auth/APK76sH_N_hfTLL0O4s645cKBY-n9mzQks5tsLPDgaJpZM4TjuKm .

Jarli01 commented 6 years ago

Running through the installation process now, I see Node version 9 is installed. Will confirm in a few minutes.

1vCPU vm 😃

Jarli01 commented 6 years ago

Ohhh they did just release node v10.0.0

Jarli01 commented 6 years ago
info fsevents@1.1.3: The platform "linux" is incompatible with this module.
info "fsevents@1.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
error upath@1.0.4: The engine "node" is incompatible with this module. Expected version ">=4 <=9".
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
yarn run v1.6.0
(node:18133) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
$ scripts/run-script --parallel build
internal/modules/cjs/loader.js:573
    throw err;
    ^

Error: Cannot find module 'promise-toolbox'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:571:15)
    at Function.Module._load (internal/modules/cjs/loader.js:497:25)
    at Module.require (internal/modules/cjs/loader.js:626:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/opt/xen-orchestra/scripts/run-script:4:32)
    at Module._compile (internal/modules/cjs/loader.js:678:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
    at Module.load (internal/modules/cjs/loader.js:589:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
    at Function.Module._load (internal/modules/cjs/loader.js:520:3)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Created symlink /etc/systemd/system/multi-user.target.wants/xo-server.service → /lib/systemd/system/xo-server.service.

Installation complete, open a browser to:
10.200.105.135

Default Login:admin@admin.net Password:admin

Don't forget to change your password!
root@xoce:~# node -v
v10.0.0
Danp2 commented 6 years ago

You should be able to manually fix this by running the following commands from the main xen-orchestra subdirectory --

sudo n LTS
sudo yarn
sudo yarn build
Jarli01 commented 6 years ago

@GeekBoxIT please try this

rm -rf /opt/xen-orchestra sudo bash single linesudo curl https://raw.githubusercontent.com/Jarli01/xenorchestra_installer/af71f0d366b71c5ea45e1dd3ca6c1760e153e39c/xo_install.sh | bash EoL

I have a beta fix there, need people to test it.

GeekBoxIT commented 6 years ago

@Danp2 LTS should be lowercase, but yes, after running

sudo n lts
sudo yarn
sudo yarn build

in /opt/xen-orchestra it's building, but failed with the following...

* xo-web:build − Error: 137
✖ 1
error Command failed with exit code 1.

@Jarli01 I will spin up a fresh VM of 17.10 and test that now. Edit: The beta worked on fresh and on original with issue after rm -rf /opt/xen-orchestra.

bnrstnr commented 6 years ago

@Jarli01 The following one worked for me on a fresh 17.10 install. sudo curl https://raw.githubusercontent.com/Jarli01/xenorchestra_installer/9689585263d4025cd74768a0db15aceb280125c6/xo_install.sh | bash

Jarli01 commented 6 years ago

Completing another test here before I merge.

Jarli01 commented 6 years ago

This issue is fixed in #13 please let us know if you have further issues!

Thanks for your support in finding this!