lidaof / eg-react

WashU Epigenome Browser
https://epigenomegateway.wustl.edu
Other
66 stars 29 forks source link

Cannot start my own backend API #346

Closed G1298192734a closed 4 months ago

G1298192734a commented 4 months ago

I can't start my server.Looking forward to your help. image

Hi!Dr.Li,I'm a student and I'm following the browser documentation to learn how to use it. firstly,I installed this browser on the windows using conda.I then tried importing a species that was not present on the browser.I enable cors through http-server,this went well. image image secondly,I tried setuping backend API because I found I can't search genes. I installed mongodb and started,downloaded the backend package through yarn,transferred the data to the mongodb database and went well image image But when I started my API,an error appeared,that day was Wednesday.I am still stuck in it until now. I don't know much about java but I try to find where the problem is image image

Thanks!

lidaof commented 4 months ago

Hi @G1298192734a Thanks you for trying the browser! I actually never seen this error before....need to google a little bit. Which node version are you using? can you try node v16?

G1298192734a commented 4 months ago

I'm using node v20 and npm v10,the latest version automatically installed by conda

G1298192734a commented 4 months ago

You are right! After using node16, everything is normal now. You directly helped me solve the problem, which is really great. thanks for your help!

G1298192734a commented 4 months ago

I will continue to try your browser and may bother you if there are any problems in the future.

lidaof commented 4 months ago

Thanks for the update @G1298192734a . Feel free to ask anytime!

G1298192734a commented 4 months ago

@lidaof Hi,Dr.Li!These days I tried embedding the browser,I known there are two ways from #212.

lidaof commented 4 months ago

Hi @G1298192734a yes, we are working on a new version with updated packages, still work in progress. Can you try typescript 3.4.5 at your side?

G1298192734a commented 4 months ago

image The error is still there,I feel that maybe the program is still using the default typescript, and the one I installed is global.

G1298192734a commented 4 months ago

image Not right either

G1298192734a commented 4 months ago

Update typescript to the latest version locally instead of globally,i get the epgg.js and epgg.css. but image

lidaof commented 4 months ago

Hi @G1298192734a can you modify your mirror based on this version https://wangftp.wustl.edu/~dli/test/frontend.zip, no need to run npm install

G1298192734a commented 4 months ago

After using the frontend you provided, I can get epgg.js and epgg.css without any problems.But they still can't work, and other js files generated under dist/js can be used. So I feel like I don’t understand the files generated by the script enough.However, my epgg.js is 9.1M and the one in the example is only 2.3M. Is there any other processing? image

lidaof commented 4 months ago

Hi @G1298192734a i am not quite sure, I guess probably due to different compress settings...but I used all default settings....what's the error msg in your version?

G1298192734a commented 4 months ago

There is no error message and the program is normal.It's just that it can't be displayed after I fill in the html. When I tried to replace the files in it, I found that it should be a problem with epgg.js. image image image image

G1298192734a commented 4 months ago

@lidaof,Hi! I believe there is no error in the build-emb step. image And I feel like the epgg.js used for html should be under umd. Could you tell me how umd is generated?

G1298192734a commented 4 months ago

Maybe the error msg you want to see is this image

lidaof commented 4 months ago

Hi @G1298192734a thanks for the screenshot...i have no clues so far....sorry, will do some tests on my side.

G1298192734a commented 4 months ago

@lidaof Hello,today I'm really glad that I found some ideas through the browser's error msg. By changing c=t.length in epgg.js to c=t?.length. The screen can be displayed, but the backend data still cannot be read. image image

lidaof commented 4 months ago

wow, that's nice! for you refGene, did you setup your mongo database etc?

lidaof commented 4 months ago

what's the error msg when start your own backend? did you use node v16 as well?

G1298192734a commented 4 months ago

Just now my backend was still running normally, but when I restarted it reported an error image The version of this node is 16.4

G1298192734a commented 4 months ago

Sorry, I killed the wrong task and the running backend was not turned off.

G1298192734a commented 4 months ago

browser error msg is the same as before. image

G1298192734a commented 4 months ago

@lidaof Hi,Dr.Li! I just fixed the backend problem by adding an nginx proxy instead of using the local backend directly and couldn't be happier. image

Although the final picture is a bit strange, this Genomic Region Locator is transparent. image

lidaof commented 4 months ago

interesting! good to know the reverse proxy fixed your problem!

G1298192734a commented 4 months ago

But I think my handling of epgg.js may still be wrong, because I don’t know what I modified.

G1298192734a commented 4 months ago

In addition, I want to import cool files, but it is a bit difficult to use higlass. I wonder if you can give me some suggestions and whether I should open an new issue?

lidaof commented 4 months ago

Hi @G1298192734a for cool files you would need to setup a higlass server, you can check more at https://docs.higlass.io/higlass_server.html

G1298192734a commented 4 months ago

OK,I will try it later. I appreciate your time. Your reply is really helpful for me. All the best.