PoonLab / covizu

Rapid analysis and visualization of coronavirus genome variation
https://filogeneti.ca/CoVizu/
MIT License
45 stars 20 forks source link

Local install error, missing DATA_FOLDER #443

Closed ArtPoon closed 1 year ago

ArtPoon commented 1 year ago

On running npm start, node threw this exception:

.env is missing HTTP_PORT. Defaulting to 8001
/home/art/git/covizu/config.js:50
    throw new Error('.env is missing DATA_FOLDER env variable')
GopiGugan commented 1 year ago

@nav-mohan recent change requires a .env.dev file with the following contents:

HTTP_PORT='8001'
NODE_ENV='DEV'
DATA_FOLDER='data'

I believe it may be easier if we have default values set when there isn't a .env.dev file present for development

ArtPoon commented 1 year ago

Ok I created this file and ran into a different error:

art@orolo:~/git/covizu$ NODE_ENV='DEV' node server.js
/home/art/git/covizu/server/parseCluster.js:247
      var nodelist = unique(cluster.edges.map(x => x.slice(0, 2)).flat());
                                                                  ^

TypeError: cluster.edges.map(...).flat is not a function
    at parse_clusters (/home/art/git/covizu/server/parseCluster.js:247:67)
    at Object.<anonymous> (/home/art/git/covizu/server.js:23:18)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
ArtPoon commented 1 year ago

looks like I need to upgrade my nodejs

art@orolo:~/git/covizu$ npm --version
6.14.4
art@orolo:~/git/covizu$ nodejs --version
v10.19.0

Node has to be version 11 or higher: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat#browser_compatibility

ArtPoon commented 1 year ago

Got server running locally now. Need to update installation instructions.