Npm install error for q2studio

Hi all,

I’m trying to set up the Studio interface, but am having a problem. I suspect this is actually a problem with webpack upstream, but am not familiar enough to troubleshoot with them directly.

Following the studio install instructions, I’m able to successfully download, pip install (into a conda env) and npm install. However, I’m stuck on npm run build, which is getting stuck on css-animation:

(qiime2-2017.10) $ npm run build

> [email protected] build /Users/kastman/Desktop/q2studio-2017.10.0
> npm run build:main && npm run build:render


> [email protected] build:main /Users/kastman/Desktop/q2studio-2017.10.0
> webpack --config config/webpack.main.config.js

Hash: 812df364370a977a6888
Version: webpack 1.15.0
Time: 7059ms
  Asset     Size  Chunks             Chunk Names
main.js  51.1 kB       0  [emitted]  main
   [0] multi main 28 bytes {0} [built]
    + 157 hidden modules

> [email protected] build:render /Users/kastman/Desktop/q2studio-2017.10.0
> webpack --config config/webpack.prod.config.js

Hash: cff05c6a7dfa47862ca2
Version: webpack 1.15.0
Time: 37980ms
       Asset       Size  Chunks             Chunk Names
js/bundle.js    2.01 MB       0  [emitted]  main
css/main.css    4.58 kB       0  [emitted]  main
  index.html  228 bytes          [emitted]  
   [0] multi main 28 bytes {0} [built]
    + 1344 hidden modules

WARNING in ./~/rc-collapse/~/css-animation/~/component-classes/index.js
Module not found: Error: Cannot resolve module 'indexof' in /Users/kastman/Desktop/q2studio-2017.10.0/node_modules/rc-collapse/node_modules/css-animation/node_modules/component-classes
 @ ./~/rc-collapse/~/css-animation/~/component-classes/index.js 6:14-32
Child html-webpack-plugin for "index.html":
        + 3 hidden modules
Child extract-text-webpack-plugin:
        + 2 hidden modules
Child extract-text-webpack-plugin:
        + 2 hidden modules
Child extract-text-webpack-plugin:
        + 2 hidden modules

The only other reference I could find of that Module not found: Error: Cannot resolve module 'indexof' error was from another webpack error, which suggested installing webpack-dev-server, which I did but didn’t help.

Any suggestions on things to try? My versions are: node v8.9.1 (npm v5.5.1) installed with nvm.

I had node 0.12.7 installed w/ nvm before and suspect this may be conflicting somehow, but I’m just not familiar enough with node to troubleshoot this well. Feel free to ask for any feedback or extra info, and thanks in advance.

Additionally, I tried this on another mac pro (10.10, node v9.1.0, npm 5.5.1) with Node installed from the system-wide installer package following the instructions, and was able to successfully get this to run. So definitely suspecting an nvm issue.

nb. This was originally asked as github issue #355 but moved here

Hi @kastman!

I suspect that something is weird with your node_modules directory. Try running this:

rm -r node_modules/

and then re-install the node stuff

npm install

Let me know if that completes successfully (and if you can run npm run build).

If the above doesn't work, it may be that our package.json has a broken dependency. Since you were able to get it working on a different computer (and your npm is recent) you could also copy the package-lock.json file from that computer and put it in the same place on the other computer. Running npm install with that file should force it to use the exact packages that worked before.

2 Likes

An off-topic reply has been split into a new topic: Q2studio install - No Module named gevent

Please keep replies on-topic in the future.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.