Issue
On Ubuntu is the possible to install Mathoid by
sudo apt-get install nodejs nodejs-legacy nodejs-dev npm mocha
npm install mathoid
cd node_modules/mathoid
npm test
But I need to do it on Fedora 23, and I don't see any nodejs legacy packages available.
If I compile without this package then I get lots of these errors
npm ERR! Error: ENOENT, lstat '/node_modules/mathoid/node_modules/service-runner/node_modules/core-js/index.js'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <[email protected]>
npm ERR! System Linux 3.10.0-123.8.1.el7.x86_64
npm ERR! command "node" "/usr/bin/npm" "install" "mathoid"
npm ERR! cwd /
npm ERR! node -v v0.10.42
npm ERR! npm -v 1.3.6
npm ERR! path /node_modules/mathoid/node_modules/service-runner/node_modules/core-js/index.js
npm ERR! fstream_path /node_modules/mathoid/node_modules/service-runner/node_modules/core-js/index.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:108:15)
npm ERR! Error: ENOENT, lstat '/node_modules/mathoid/node_modules/service-runner/node_modules/yargs/lib/usage.js'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <[email protected]>
Question
What is the equivalent of nodejs-legacy
on Fedora?
Solution
If you need to use an older version of node, you can see if it's available in the repo:
dnf info nodejs.x86_64 --showduplicates | grep Version
If that's one of the specific versions that you need, you can downgrade to it.
However, I would recommend that you use a 'virtual environment' to install different node versions simultaneously. nave is a great option. You could also try nvm.
Answered By - Will Demaine Answer Checked By - Robin (WPSolving Admin)