Skip to content

Math formular do not render, save edits fails #63

@simontaurus

Description

@simontaurus
MWException: Failed to execute Mathoid cli '/usr/local/nodejs/mathoid/node_modules/mathoid/cli.js', reason: /usr/local/nodejs/mathoid/node_modules/speech-rule-engine/node_modules/commander/lib/command.js:70
useColor() ?? (process.stdout.isTTY && process.stdout.hasColors?.()),
^

SyntaxError: Unexpected token ?

Note: Will be fixed by MW > 1.40, see https://www.mediawiki.org/wiki/Extension:Math/en

Default nodejs version v12 in the current Ubuntu base image seems to rejects syntax in the outdated commander 6.2.1 package.

&& apt-get update -y && apt-get install --no-install-recommends -y -o Dpkg::Options::="--force-confold" -y nodejs npm librsvg2-dev build-essential \

Workaround: Downgrade to node v10

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
source ~/.bashrc
apt remove nodejs
nvm install v10.24.1

create new symlink
ln -s "$(which node)" /usr/bin/node

However, www-data has no permission to access /root/.nvm/versions/node/v10.24.1/bin/

UPDATE: Actual problem is that node_modules/speech-rule-engine/node_modules/commander/ is v13.1.0 which is probably to new for Node v12

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions