XO Community Edition Update Error - XO-Web
-
Error at new JS_Parse_Error (eval at <anonymous> (/opt/xo-web/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js:1:1), <anonymous>:1547:18) at js_error (eval at <anonymous> (/opt/xo-web/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js:1:1), <anonymous>:1555:11) at parse_error (eval at <anonymous> (/opt/xo-web/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js:1:1), <anonymous>:1679:9) at Object.next_token [as input] (eval at <anonymous> (/opt/xo-web/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js:1:1), <anonymous>:1951:9) at next (eval at <anonymous> (/opt/xo-web/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js:1:1), <anonymous>:2080:25) at eval (eval at <anonymous> (/opt/xo-web/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js:1:1), <anonymous>:2210:42) at eval (eval at <anonymous> (/opt/xo-web/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js:1:1), <anonymous>:2141:24) at block_ (eval at <anonymous> (/opt/xo-web/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js:1:1), <anonymous>:2434:20) at eval (eval at <anonymous> (/opt/xo-web/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js:1:1), <anonymous>:2406:25) at function_ (eval at <anonymous> (/opt/xo-web/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js:1:1), <anonymous>:2412:15) [[90m12:28:40[39m] '[36mbuild[39m' [31merrored after[39m [35m1.12 min[39m
Getting that error while patching, searching through the rest of this putty log.
-
-
Builds correctly using yarn instead of npm.
-
@Danp said in XO Community Edition Update Error - XO-Web:
Builds correctly using yarn instead of npm.
Care to share so I don't have to discover it?
-
To install yarn, you first need to update your repository --
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
Then
sudo apt-get update && sudo apt-get install yarn
to perform the actual installation. -
Then just issue the
yarn
command from within the desired source directory to initiate the build process. -
@Danp said in XO Community Edition Update Error - XO-Web:
Then just issue the
yarn
command from within the desired source directory to initiate the build process.build process? I thought there was no real source code here?
-
@Dashrender said in XO Community Edition Update Error - XO-Web:
@Danp said in XO Community Edition Update Error - XO-Web:
Then just issue the
yarn
command from within the desired source directory to initiate the build process.build process? I thought there was no real source code here?
quit it....
-
This is with a clean installation of
yarn
usingcurl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
and then
sudo apt-get update && sudo apt-get install yarn
and then simply commenting out
sudo npm i
andsudo npm run build
and insertingsudo yarn
in their place.xoadmin@ubuntu:/opt/xo-web$ sudo /opt/xo-update/xo-update.sh Stopping xo-server... Checking xo-server... Current branch next-release Current version v5.6.2 17 updates available Updating from source... Saved working directory and index state WIP on next-release: aa6ff6c fix(xapi.installSupplementalPackOnAllHosts): multi-pipe stream (#508) HEAD is now at aa6ff6c fix(xapi.installSupplementalPackOnAllHosts): multi-pipe stream (#508) Updating aa6ff6c..3e4efcf Fast-forward .mention-bot | 3 + index.js | 2 +- package.json | 37 ++++--- src/api/vm.coffee | 3 + src/api/xosan.js | 29 +++-- src/http-request.js | 9 +- src/models/utils.js | 5 +- src/xapi/index.js | 12 +-- src/xapi/mixins/vm.js | 8 +- src/xo-mixins/backups.js | 4 +- yarn.lock | 1200 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------------------------------------------------- 11 files changed, 719 insertions(+), 593 deletions(-) create mode 100644 .mention-bot Clearing directories... Building from source... yarn install v0.21.3 [1/4] Resolving packages... [2/4] Fetching packages... warning [email protected]: The platform "linux" is incompatible with this module. info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies... [4/4] Building fresh packages... [1/5] â arp-a [1/5] â arp-a: gyp info spawn args '-Goutput_dir=.' ] [-/5] â waiting... [-/5] â waiting... [-/5] â waiting... [-/5] â waiting... [-/5] â waiting... [-/5] â waiting... [-/5] â waiting... $ npm run build > [email protected] prebuild /opt/xo-server > index-modules src/api src/xapi/mixins src/xo-mixins index generated src/xapi/mixins/index.js index generated src/api/index.js index generated src/xo-mixins/index.js > [email protected] build /opt/xo-server > gulp build --production [14:50:53] Using gulpfile /opt/xo-server/gulpfile.js [14:50:53] Starting 'build'... [14:50:53] Starting 'clean'... [14:50:53] Finished 'clean' after 6.31 ms [14:50:53] Starting 'buildCoffee'... [14:50:53] Starting 'buildEs6'... [14:50:59] Finished 'buildCoffee' after 5.07 s [14:51:17] Finished 'buildEs6' after 24 s [14:51:17] Finished 'build' after 24 s Done in 49.74s. Updated version v5.6.4 Checking xo-web... Current branch stable Current version v5.6.1 15 updates available Updating from source... Saved working directory and index state WIP on stable: f9a3ad1 5.6.1 HEAD is now at f9a3ad1 5.6.1 Updating f9a3ad1..e8d2b32 Fast-forward .gitignore | 1 + package.json | 20 ++--- src/common/__snapshots__/grid.spec.js.snap | 17 +++-- src/common/intl/locales/.gitignore | 1 - src/common/store/actions.js | 45 +++++------- src/common/store/reducer.js | 14 ++-- src/common/xoa-upgrade.js | 18 +++-- src/xo-app/menu/index.js | 2 +- src/xo-app/pool/tab-patches.js | 5 +- yarn.lock | 753 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------- 10 files changed, 447 insertions(+), 429 deletions(-) delete mode 100644 src/common/intl/locales/.gitignore ghooks not found! Make sure you have it installed on your "node_modules". Skipping git hooks. Clearing directories... Building from source... yarn install v0.21.3 [1/4] Resolving packages... â is-arrayish@^0.2.1 [2/4] Fetching packages... warning [email protected]: The platform "linux" is incompatible with this module. info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies... [4/4] Building fresh packages... [1/2] â node-sass [1/2] â node-sass [1/2] â node-sass: Downloading binary from https://github.com/sass/node-sass/releases/download/v4.2.0/linux-x64-51_binding.node [1/2] â node-sass: Downloading binary from https://github.com/sass/node-sass/releases/download/v4.2.0/linux-x64-51_binding.node [1/2] â node-sass: Downloading binary from https://github.com/sass/node-sass/releases/download/v4.2.0/linux-x64-51_binding.node $ npm run build > [email protected] build /opt/xo-web > npm run build-indexes && NODE_ENV=production gulp build > [email protected] build-indexes /opt/xo-web > index-modules --auto src index generated src/common/intl/locales/index.js [14:51:54] Using gulpfile /opt/xo-web/gulpfile.js [14:51:54] Starting 'build'... [14:51:54] Starting 'buildPages'... [14:51:54] Starting 'buildScripts'... [14:51:54] Starting 'buildStyles'... [14:51:54] Starting 'copyAssets'... [14:51:55] Finished 'buildPages' after 1.14 s [14:51:58] Finished 'buildStyles' after 3.97 s [14:51:58] Finished 'copyAssets' after 4.02 s [14:54:16] Finished 'buildScripts' after 2.37 min [14:54:16] Finished 'build' after 2.37 min Done in 168.78s. Updated version v5.6.2 Restarting xo-server... xoadmin@ubuntu:/opt/xo-web$
-
My noob is showing - why do we need to do this? What's broken that requires this change?
What's the difference between npm and yarn?
-
@Dashrender said in XO Community Edition Update Error - XO-Web:
My noob is showing - why do we need to do this? What's broken that requires this change?
What's the difference between npm and yarn?
It is now the preferred dependency manager that XO is using. So in an effort to be as close to XOA as possible, we try to use the same solution as they do.
It reduces our troubleshooting if everything is identical.
-
@Dashrender Yarn apparently does a better job to maintaining packages and updating dependencies.
-
@Danp said in XO Community Edition Update Error - XO-Web:
@Dashrender Yarn apparently does a better job to maintaining packages and updating dependencies.
So it was necessary to make a whole new thing, not just fix the old broken thing?
-
It's not a whole new thing. Yarn replaces the command
npm i
which previously handles the dependency installation. -
@Danp said in XO Community Edition Update Error - XO-Web:
It's not a whole new thing. Yarn replaces the command
npm i
which previously handles the dependency installation.But it is new, it's a new thing you have to install. It's not like you just upgraded npm and the new version does what you want, you installed a whole new program to handle this. Which also required you changing their update script to use the new dependency manager.
-
@Dashrender said in XO Community Edition Update Error - XO-Web:
@Danp said in XO Community Edition Update Error - XO-Web:
It's not a whole new thing. Yarn replaces the command
npm i
which previously handles the dependency installation.But it is new, it's a new thing you have to install. It's not like you just upgraded npm and the new version does what you want, you installed a whole new program to handle this. Which also required you changing
theirthe update script to use the new dependency manager.Corrected.
-
xoadmin@ubuntu:/opt/xo-web$ sudo curl https://raw.githubusercontent.com/scottalanmiller/xenorchestra_updater/master/xo-update.sh | bash -s -- -f % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1906 100 1906 0 0 4702 0 --:--:-- --:--:-- --:--:-- 4694 Please run as root (sudo bash) xoadmin@ubuntu:/opt/xo-web$ sudo curl https://raw.githubusercontent.com/scottalanmiller/xenorchestra_updater/master/xo-update.sh | sudo bash -s -- -f % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1906 100 1906 0 0 5989 0 --:--:-- --:--:-- --:--:-- 5993 Stopping xo-server... Checking xo-server... Current branch next-release Current version v5.6.4 0 updates available Updating from source... No local changes to save Already up-to-date. Clearing directories... Installing... yarn install v0.21.3 [1/4] Resolving packages... success Already up-to-date. $ npm run build > [email protected] prebuild /opt/xo-server > index-modules src/api src/xapi/mixins src/xo-mixins sh: 1: index-modules: not found npm ERR! Linux 4.8.0-39-generic npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build" npm ERR! node v7.2.1 npm ERR! npm v3.10.10 npm ERR! file sh npm ERR! code ELIFECYCLE npm ERR! errno ENOENT npm ERR! syscall spawn npm ERR! [email protected] prebuild: `index-modules src/api src/xapi/mixins src/xo-mixins` npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the [email protected] prebuild script 'index-modules src/api src/xapi/mixins src/xo-mixins'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the xo-server package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! index-modules src/api src/xapi/mixins src/xo-mixins npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs xo-server npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls xo-server npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /opt/xo-server/npm-debug.log error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. Updated version v5.6.4 Checking xo-web... Current branch stable Current version v5.6.2 0 updates available Updating from source... Saved working directory and index state WIP on stable: e8d2b32 5.6.2 HEAD is now at e8d2b32 5.6.2 Already up-to-date. Clearing directories... Installing... yarn install v0.21.3 [1/4] Resolving packages... â is-arrayish@^0.2.1 success Already up-to-date. $ npm run build > [email protected] build /opt/xo-web > npm run build-indexes && NODE_ENV=production gulp build > [email protected] build-indexes /opt/xo-web > index-modules --auto src sh: 1: index-modules: not found npm ERR! Linux 4.8.0-39-generic npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build-indexes" npm ERR! node v7.2.1 npm ERR! npm v3.10.10 npm ERR! file sh npm ERR! code ELIFECYCLE npm ERR! errno ENOENT npm ERR! syscall spawn npm ERR! [email protected] build-indexes: `index-modules --auto src` npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the [email protected] build-indexes script 'index-modules --auto src'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the xo-web package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! index-modules --auto src npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs xo-web npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls xo-web npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /opt/xo-web/npm-debug.log npm ERR! Linux 4.8.0-39-generic npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build" npm ERR! node v7.2.1 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! [email protected] build: `npm run build-indexes && NODE_ENV=production gulp build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] build script 'npm run build-indexes && NODE_ENV=production gulp build'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the xo-web package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! npm run build-indexes && NODE_ENV=production gulp build npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs xo-web npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls xo-web npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /opt/xo-web/npm-debug.log error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. Updated version v5.6.2 Restarting xo-server...
-
@DustinB3403 said in XO Community Edition Update Error - XO-Web:
@Dashrender said in XO Community Edition Update Error - XO-Web:
@Danp said in XO Community Edition Update Error - XO-Web:
It's not a whole new thing. Yarn replaces the command
npm i
which previously handles the dependency installation.But it is new, it's a new thing you have to install. It's not like you just upgraded npm and the new version does what you want, you installed a whole new program to handle this. Which also required you changing
theirthe update script to use the new dependency manager.Corrected.
oh yeah.. my bad.
-
@Dashrender said in XO Community Edition Update Error - XO-Web:
@DustinB3403 said in XO Community Edition Update Error - XO-Web:
@Dashrender said in XO Community Edition Update Error - XO-Web:
@Danp said in XO Community Edition Update Error - XO-Web:
It's not a whole new thing. Yarn replaces the command
npm i
which previously handles the dependency installation.But it is new, it's a new thing you have to install. It's not like you just upgraded npm and the new version does what you want, you installed a whole new program to handle this. Which also required you changing
theirthe update script to use the new dependency manager.Corrected.
oh yeah.. my bad.
-
On trying the clean installation this is what I'm getting.
[15:48:59] 'buildScripts' errored after 1.3 min [15:48:59] GulpUglifyError: unable to minify JavaScript Caused by: SyntaxError: Unexpected character '`' (line: 98370, col: 13, pos: 3117237) Error at new JS_Parse_Error (eval at <anonymous> (/opt/xo-web/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js:1:1), <anonymous>:1547:18) at js_error (eval at <anonymous> (/opt/xo-web/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js:1:1), <anonymous>:1555:11) at parse_error (eval at <anonymous> (/opt/xo-web/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js:1:1), <anonymous>:1679:9) at Object.next_token [as input] (eval at <anonymous> (/opt/xo-web/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js:1:1), <anonymous>:1951:9) at next (eval at <anonymous> (/opt/xo-web/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js:1:1), <anonymous>:2080:25) at eval (eval at <anonymous> (/opt/xo-web/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js:1:1), <anonymous>:2210:42) at eval (eval at <anonymous> (/opt/xo-web/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js:1:1), <anonymous>:2141:24) at block_ (eval at <anonymous> (/opt/xo-web/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js:1:1), <anonymous>:2434:20) at eval (eval at <anonymous> (/opt/xo-web/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js:1:1), <anonymous>:2406:25) at function_ (eval at <anonymous> (/opt/xo-web/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js:1:1), <anonymous>:2412:15) [15:48:59] 'build' errored after 1.3 min npm ERR! Linux 4.8.0-39-generic npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build" npm ERR! node v7.6.0 npm ERR! npm v4.1.2 npm ERR! code ELIFECYCLE npm ERR! [email protected] build: `npm run build-indexes && NODE_ENV=production gulp build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] build script 'npm run build-indexes && NODE_ENV=production gulp build'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the xo-web package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! npm run build-indexes && NODE_ENV=production gulp build npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs xo-web npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls xo-web npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /opt/xo-web/npm-debug.log