open-geocomputing / OpenEarthEngineLibrary

https://www.open-geocomputing.org/OpenEarthEngineLibrary/
125 stars 38 forks source link

Some error about unpromisefy #13

Closed mty0716 closed 1 year ago

mty0716 commented 1 year ago

I know very little about nodejs. Now I want to use Landtrendr algorithm on geemap based on oeel, but I am having problems deploying the environment. Can you provide some help on nodejs, especially on the unpromisefy side. It is known that nodejs and git are up to date. 1677049032961 1677049032965

mgravey commented 1 year ago

I am aware of this issue since yesterday afternoon, and I am working on it. The problem is more from the unpromisefy package (https://github.com/mgravey/unpromisefy.js), that is a C++ code for node. That requires compilation tools available on your platform to compile. It passed all the tests I did, because I have these tools installed on my platform.

If it's urgent you can install these tools, when installing (or modify if when already installed) node it asks you if you want to install compilers and others, just select the box and follow the instructions.

I realize that it's clearly suboptimal (and heavy installation just for this), and I am working on providing prebuild versions of this package that will install transparently. But I am still working on how to deploy this.

mty0716 commented 1 year ago

Very good. I also found a problem with the unpromisefy package. I think the official documentation is not particularly detailed, and more tutorials on installation can be added, such as the deployment of nodejs and git. Hope to be able to use oeel without any problems in the near future. Thank you so much for your work and responses!

mgravey commented 1 year ago

Now It should be fixed.

mty0716 commented 1 year ago

I installed the promisefy package in node using npm, and he did not report errors or other problems. But I encountered another problem when running "from oeel import oeel" or “oeel = geemap.requireJS()” in jupyter notebook as shown below. What is the cause of this problem? image

mgravey commented 1 year ago

is it fix now ?

tomoyohime commented 1 year ago

is it fix now ?

image image image

tomoyohime commented 1 year ago

is it fix now ?

I still find the problem to exist. And I don't know what to do. I have changed my nodejs version to 16.20.0, but it seems useless. I cannot install "unpromisefy" module. Could you please give me some help? Thanks a lot. The screenshots are shown above.

mgravey commented 1 year ago

what happen if you go empty folder and try "npm install unpromisefy" ??

can you provide me OS (including version ) and CPU (intel, ARM,...) do you have by chance a compiler installed ?

tomoyohime commented 1 year ago

what happen if you go empty folder and try "npm install unpromisefy" ??

can you provide me OS (including version ) and CPU (intel, ARM,...) do you have by chance a compiler installed ?

image I tried an empty folder but it seemed nothing changed. I use Windows 10, Intel(R) Core(TM) i5-8250U CPU. I use miniconda and have created an environment called 'gee' to use oeel in jupyter lab. First I 'pip install oeel' and 'import oeel'. But when I wanted to use some functions, I met with these questions. As I am a beginner to nodejs and ee, it makes me really confused... I am looking forward to your reply. Thanks a lot.

mgravey commented 1 year ago

Do you have any particular reason to still be under node 16 ? Can you try to update to 18 or so ?

I am not sure if this is the issue, and I didn't test on 16. Normally, node 12, 14, 16 ,17, 18, 19 are supported, but I don't want to invest time to support an old node version.

BTW, only 64-bit version exists in precompiled, if you have a node 32 bit( that I doubt, you can check with node -p "process.arch") you will need to have a compiler installed, to compile it on your own machine.

mgravey commented 1 year ago

can you download this file ? https://github.com/mgravey/unpromisefy.js/raw/bin/1.0.2/win32/x64/unpromisefy-node-v93-win32-x64.tar.gz If not, it's a network issue! The logs say it doesn't work, but it should. Are you using a proxy or something ?

tomoyohime commented 1 year ago

can you download this file ? https://github.com/mgravey/unpromisefy.js/raw/bin/1.0.2/win32/x64/unpromisefy-node-v93-win32-x64.tar.gz If not, it's a network issue! The logs say it doesn't work, but it should. Are you using a proxy or something ?

I use a VPN and I can download this file. Finally I found it was caused by folder permissions. I modified the folder permissions and the problem was fixed. I can install unpromisefy now.

mgravey commented 1 year ago

perfect