'yarn build' failure
-
Hi,
On a freshly installed Debian 10.9 amd64 system, strictly following the build-from-sources procedure - just for reference:
apt-get update apt-get upgrade curl -fsSL https://deb.nodesource.com/setup_14.x | bash - apt-get install gcc g++ make apt-get install -y nodejs curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /usr/share/keyrings/yarnkey.gpg >/dev/null echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | tee /etc/apt/sources.list.d/yarn.list apt-get update && sudo apt-get install yarn apt-get install build-essential redis-server libpng-dev git python-minimal libvhdi-utils lvm2 cifs-utils
yarn build
fails with
Using polyfills: No polyfills were added, since the `useBuiltIns` option was not set. Successfully compiled 131 files with Babel (31694ms). [09:53:39] Finished 'buildStyles' after 14 s [09:53:39] Finished 'copyAssets' after 15 s [09:54:44] 'buildScripts' errored after 1.32 min [09:54:44] GulpUglifyError: unable to minify JavaScript Caused by: SyntaxError: Unexpected token name «await», expected punc «(» File: /home/xci/xen-orchestra/packages/xo-web/src/index.js Line: 219419 Col: 8 [09:54:44] 'build' errored after 1.32 min * xo-web:build − Error: 1 ✖ 1 error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
(I had a fully working Debian Stretch VM with xen-orchestra, but on the last 'git pull --ff-only' I was forced to upgrade nodejs from 14.6 to 14.7, which failed, so I decided to start from scratch).
Any ideas?
-
@ci4ic4 Have you verified your versions of yarn and node?
There have been some source code updates since your post, so you could try again with the latest source.
-
It fails for me too now (just updated):
Using polyfills: No polyfills were added, since the `useBuiltIns` option was not set. [11:53:28] Finished 'buildStyles' after 9.46 s [11:53:28] Finished 'copyAssets' after 9.47 s [11:54:25] 'buildScripts' errored after 1.1 min [11:54:25] GulpUglifyError: unable to minify JavaScript Caused by: SyntaxError: Unexpected token name «await», expected punc «(» File: /opt/xen-orchestra/packages/xo-web/src/index.js Line: 219845 Col: 8 [11:54:25] 'build' errored after 1.1 min * xo-web:build − Error: 1 ✖ 2 error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
-
Damn always when you forget to take a snapshot before trying to build from sources it fails
-
error xo-server@5.79.5: The engine "node" is incompatible with this module. Expected version ">=14.17". Got "14.16.0"
Did someone bump that ?
-
@meth0d Yes, the requirements were recently changed so that v14.17 or later is required.
The pertinent phase is "Please use Node LTS version 14". I don't believe the intent is to show the correct / required version when displaying the output of
node -v
. -
@danp Well I will try to update node later but since you got the exact same error something else seems to be going on.
-
Maybe @julien-f can shed some light on the issue.
-
Hmm something is off here.
I grabbed the latest node 14 from nodesource:nodejs is already the newest version (14.17.0-deb-1nodesource1).
But:
root@xoa:~# node -v v14.16.0
-
Indeed, due to conversion of
xo-server
to ES modules, Node 14.17 is now required.I've just updated the docs to clarify that we target latest Node LTS.
-
I confirm an issue with
xo-web
though, investigating… -
@julien-f : thx for investigating.
Tried a fresh install half of the day with the same error and thought i am doing something wrong.
Then i tried updateing a running installation and hit the same error.I keep investigating by myself too.
-
Should now be fixed, sorry for this.
-
@ci4ic4 how did you manage to update from 14.16 to 14.17 on Debian 10?
deb.nodesource.com/setup_14.x just seems to give me 14.16
-
@meth0d I use
n lts
to install the correct version -
-
@meth0d See the reference sequence provided in the original post. As I said, my reason to go to Buster was my inability to upgrade to nodejs 14.17.
-
Builds now, thanks for the quick response.
-
@julien-f
thx for the quick fix. works perfectly now.