mountainsort icon indicating copy to clipboard operation
mountainsort copied to clipboard

Error just after installation using conda

Open kimjack0 opened this issue 4 years ago • 5 comments

Hi~,

I am having same trouble for 4 days. After installing using conda, I run ml-list-processors and then I get the next errors.

(mtsort) jaekyung@jaekyung-ubuntu:~/conda/envs/mtsort$ ml-list-processors /home/jaekyung/conda/envs/mtsort/lib/node_modules/mountainlab/mlproc/mlproc:191 async function main() { ^^^^^^^^

SyntaxError: Unexpected token function at createScript (vm.js:56:10) at Object.runInThisContext (vm.js:97:10) at Module._compile (module.js:549:28) at Object.Module._extensions..js (module.js:586:10) at Module.load (module.js:494:32) at tryModuleLoad (module.js:453:12) at Function.Module._load (module.js:445:3) at Module.runMain (module.js:611:10) at run (bootstrap_node.js:387:7) at startup (bootstrap_node.js:153:9)

I have used old versions and I am trying to use new version. I could do everything with old version. I got this error in WSL. So I installed ubuntu 20.04 and then trying again. But still I see the same error. Do you know what happens now?

Thanks!

kimjack0 avatar Aug 07 '20 20:08 kimjack0

This is probably caused by a too-old version of nodejs.

magland avatar Aug 10 '20 16:08 magland

Thanks for the comment. I realized that if I install one processor and then one processor. It is okay. When I tried install all processors at the same time (using conda) some processor was not installed correctly. So now i fixed this problem using this method. My colleague also had same issue installing via conda.

kimjack0 avatar Aug 25 '20 16:08 kimjack0

This is probably caused by a too-old version of nodejs.

Magland is right. I ran into the same error when I was trying to deploy mountainsort on another machine when using the conda install method. Installing the mountainlab in the conda virtual environment might cause a nodejs version confusion when you have a newer nodejs version in your system environment while there is also an older version of nodejs in your virtual environment.

Check your nodejs version using node -v when the virtual environment is either activated or deactivated, mine was -6.x and -14.x

To update the nodejs inside the virtual environment, simply use conda update -n YOUR_ENVIRONMENT_NAME nodejs.

Hopefully this will solve your issue.

stoneqq avatar Nov 23 '20 03:11 stoneqq

Hi, I've been having a similar issue and did find that updating node fixed that error message, but @kimjack0 you said that you also had issues if you installed the processors in a certain order. Could you let me know what the order was that worked? I'm getting errors because I'm missing some js package I think.

warnerwarner avatar Feb 01 '21 12:02 warnerwarner

The error is because of installing mountainsort in a new conda environment. Even if you update all the packages in the new conda environment, nodejs doesn't get updated and stays at v6.xx

The way I solved this is by upgrading nodejs manually in the conda environment for mountainsort:

conda activate <name of environment>
conda install node-js -c conda-forge
conda install nodejs -c conda-forge --repodata-fn=repodata.json

This updates nodejs from version 6.xx to 12.4.0 which is good enough to make it work!

hyr2 avatar Sep 20 '21 01:09 hyr2