Q2studio npm start error

Hi, community!
Nowdays, I wanna use q2studio in my computer, and I use ubuntu 18.04LTS. I’ve already installed qiime2-2021.2 via conda.But when I installed q2studio, everything was OK until this step:

(qtest-2102) [email protected]:~/tem_software/q2studio-2021.2.0$ npm start

[email protected] start /home/lhr/tem_software/q2studio-2021.2.0
cross-env NODE_ENV=production electron -r babel-register build/main.js

npm ERR! Linux 4.4.0-19041-Microsoft
npm ERR! argv “/home/lhr/miniconda2/envs/qtest-2102/bin/node” “/home/lhr/miniconda2/envs/qtest-2102/bin/npm” “start”
npm ERR! node v6.11.2
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: cross-env NODE_ENV=production electron -r babel-register build/main.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script ‘cross-env NODE_ENV=production electron -r babel-register build/main.js’.
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 q2studio package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cross-env NODE_ENV=production electron -r babel-register build/main.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs q2studio
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR! npm owner ls q2studio
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/lhr/tem_software/q2studio-2021.2.0/npm-debug.log

And the content of the debug.log is shown below:

0 info it worked if it ends with ok
1 verbose cli [ ‘/home/lhr/miniconda2/envs/qtest-2102/bin/node’,
1 verbose cli ‘/home/lhr/miniconda2/envs/qtest-2102/bin/npm’,
1 verbose cli ‘start’ ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ ‘prestart’, ‘start’, ‘poststart’ ]
5 info lifecycle [email protected]~prestart: [email protected]
6 silly lifecycle [email protected]~prestart: no script for prestart, continuing
7 info lifecycle [email protected]~start: [email protected]
8 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]~start: PATH: /home/lhr/miniconda2/envs/qtest-2102/lib/node_modules/npm/bin/node-gyp-bin:/home/lhr/tem_software/q2studio-2021.2.0/node_modules/.bin:/home/lhr/miniconda2/envs/qtest-2102/bin:/home/lhr/miniconda2/condabin:/home/lhr/miniconda2/bin:/home/lhr/miniconda2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files/WindowsApps/CanonicalGroupLimited.Ubuntu18.04onWindows_1804.2020.824.0_x64__79rhkp1fndgsc:/mnt/f/linux/bin:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Windows/System32/OpenSSH:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Users/DELL/AppData/Local/Microsoft/WindowsApps:/snap/bin
10 verbose lifecycle q2[email protected]~start: CWD: /home/lhr/tem_software/q2studio-2021.2.0
11 silly lifecycle [email protected]~start: Args: [ ‘-c’,
11 silly lifecycle ‘cross-env NODE_ENV=production electron -r babel-register build/main.js’ ]
12 silly lifecycle [email protected]~start: Returned: code: 1 signal: null
13 info lifecycle [email protected]~start: Failed to exec start script
14 verbose stack Error: [email protected] start: cross-env NODE_ENV=production electron -r babel-register build/main.js
14 verbose stack Exit status 1
14 verbose stack at EventEmitter. (/home/lhr/miniconda2/envs/qtest-2102/lib/node_modules/npm/lib/utils/lifecycle.js:255:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess. (/home/lhr/miniconda2/envs/qtest-2102/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:891:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid [email protected]
16 verbose cwd /home/lhr/tem_software/q2studio-2021.2.0
17 error Linux 4.4.0-19041-Microsoft
18 error argv “/home/lhr/miniconda2/envs/qtest-2102/bin/node” “/home/lhr/miniconda2/envs/qtest-2102/bin/npm” “start”
19 error node v6.11.2
20 error npm v3.10.10
21 error code ELIFECYCLE
22 error [email protected] start: cross-env NODE_ENV=production electron -r babel-register build/main.js
22 error Exit status 1
23 error Failed at the [email protected] start script ‘cross-env NODE_ENV=production electron -r babel-register build/main.js’.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the q2studio package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error cross-env NODE_ENV=production electron -r babel-register build/main.js
23 error You can get information on how to open an issue for this project with:
23 error npm bugs q2studio
23 error Or if that isn’t available, you can get their info via:
23 error npm owner ls q2studio
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
I have none idea to deal with it.

Hi, @hesterlee and welcome to the forum! :wave:

The error message states:

It also lists the version of node you are using:

When you follow the installation instructions here, you should get a newer version of node. If you followed those instructions (especially conda install gevent nodejs -c defaults --override-channels, which installs nodejs into your qiime 2 environment if it is activated) and you are still having a problem, then that means your computer is using a different node installation. If you activate your qiime 2 environment and then use these commands: which node and which npm, what do you see?

Your issue may be similar to the one here:

I would suggest simply creating a fresh qiime 2 enviroment and follow the q2studio installation instructions closely to see if that resolves the issue. Let me know how it works out!

Thanks for your help !
When I installed q2studio, I found ‘pip install .’ can’t run if my conda base enviroment didn’t have nodejs, even if my qiime2 environment had nodejs.Then I run

conda install gevent nodejs -c defaults --override-channels

in my base enviroment, and I can get nodejs=10.13.0.
I followed your suggestion to create a new qiime2 environment via conda, and run

conda install gevent nodejs -c defaults --override-channels

in my new environment, but it would get nodejs=6.11.2. I thought I probably ignored somthing else.

Actually, I think there may be some more important issue:my linux subsystem(Ubuntu 18.04LTS in Windows10) need some setting about visual management that is ignored by me. I tired to install q2studio in Virtual Machine(VMware, Ubuntu 20.04LTS).According to the error message, I used ‘sudo apt install xxx’ to install the package, and then q2studio can work normally.

That’s good to hear! I think running q2studio in a VM is probably a safer bet rather than using WSL anyways. Side note: these kinds of issues will become less relevant as the Galaxy interface continues to be developed: QIIME 2 2021.4 is now available!

2 Likes