skydiver / ewelink-api

eWeLink API for JavaScript
https://www.npmjs.com/package/ewelink-api
MIT License
268 stars 108 forks source link

Unable to install ewelink-api using nodejs (Windows) #132

Open TonysTechFix opened 3 years ago

TonysTechFix commented 3 years ago

I am total newbie to node, but I have installed node.js & Visual Studio Code on Win 10.

From within VSC if I call "install ewelink-api" I see a list of errors (mainly file / path related). I would be very grateful if someone could point out what I am doing wrong.

This is what I see in VSC terminal:- `npm install ewelink-api

npm ERR! code ENOENT npm ERR! syscall spawn git npm ERR! path git npm ERR! errno -4058 npm ERR! enoent Error while executing: npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/skydiver/arpping.git npm ERR! enoent npm ERR! enoent npm ERR! enoent spawn git ENOENT npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent `

bwp91 commented 3 years ago

do you have git installed on your windows?

TonysTechFix commented 3 years ago

No... I have a github account, but not yet installed git.  Thanks for the headsup. 👍

Seasons greetings.

⁣Get BlueMail for Android ​

On 23 Dec 2020, 23:50, at 23:50, Ben notifications@github.com wrote:

do you have git installed on your windows?

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/skydiver/ewelink-api/issues/132#issuecomment-750486835

stoleskopje commented 3 years ago

Could you give us more explanation of how to overcome the error (same as above) having a git on the desktop?

TonysTechFix commented 3 years ago

I solved the problem ok. It was my bad - sorry. I did not have git installed. Now I installed it, and ewelink-api is installed ok.

Thanks for your help.

On Thu, 14 Jan 2021 at 21:22, stoleskopje notifications@github.com wrote:

Could you give us more explanation of how to overcome the error (same as above) having a git on the desktop?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/skydiver/ewelink-api/issues/132#issuecomment-760484334, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASH5ZKDSKNSATZT6EA55PSTSZ5OALANCNFSM4VHOF4YQ .

--

TonysTechFix Computer Repairs | Networks | Audio & Video Solutions | Digital Artwork | Flyers | Catalogues | Shop Window Graphics Contact: Tony Davies Tel: +357 97633281 Email: TonysTechFix@gmail.com Kalavasos, Cyprus

stoleskopje commented 3 years ago

Sorry, I was not clear. I am having the same problem as you, but I do have git already installed on my desktop and still have the same error (cloned both, ewelink-api and node-red-contrib-ewelink). Both installations gave me the same error "error enoent undefined ls-remote -h -t ssh://git@github.com/skydiver/arpping.git" Probably I am missing some step (path, or something in that sense). Thanks

TonysTechFix commented 3 years ago

Ah, ok. So, to be honest. I'm not 100% sure what I did that fixed the issue. But Also I was originally using windows command prompt, but later I switched to PowerShell, and maybe stopped & started node a few times. But I could not make progress with nodejs (my brain is too stupid to understand what to do with it!!)

With regards to Node-Red, I found that was much more "user friendly" and having got Node-Red running, I then installed node-red-contrib-ewelink via the "Palette Manager" menu. It installed fine, and it all works very well.

On Fri, 15 Jan 2021 at 14:05, stoleskopje notifications@github.com wrote:

Sorry, I was not clear. I am having the same problem as you, but I do have git already installed on my desktop and still have the same error (cloned both, ewelink-api and node-red-contrib-ewelink). Both installations gave me the same error "error enoent undefined ls-remote -h -t ssh:// git@github.com/skydiver/arpping.git" Probably I am missing some step (path, or something in that sense). Thanks

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/skydiver/ewelink-api/issues/132#issuecomment-760960764, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASH5ZKHHV77S3AAND74B7Q3S2BDTVANCNFSM4VHOF4YQ .

--

TonysTechFix Computer Repairs | Networks | Audio & Video Solutions | Digital Artwork | Flyers | Catalogues | Shop Window Graphics Contact: Tony Davies Tel: +357 97633281 Email: TonysTechFix@gmail.com Kalavasos, Cyprus

stoleskopje commented 3 years ago

Yes, first I used the "Palette Manager" (V2 , node-red-contrib-ewelink) and got an error. After that, I tried installation trough cmd-nmp. I got the same error as the Pallete Manager. At Node-Red "Pallete manager" I am having two files, the new one V2.0 (node-red-contrib-ewelink) with installation error, and the old one V1.1 ("node-red-contrib-ewelink-copy") that is corrrectly installed, but not fully functioning (some features with "Device" are not working, so I thought the V2 should be ok). Thanks for the advice for the Power Shell, I will try too. Thanks

Medicalmusings commented 3 years ago

Same issue on Raspberry PI both installing via Pallette within node-red GUI and via NPM. SOLVED by installing GIT from within Raspberian This is going to catch a LOT of people out Really recommend note on the ewelink page at https://flows.nodered.org/node/node-red-contrib-ewelink that GIT is a dependency.

ramfatullah commented 3 years ago

do you have git installed on your windows?

how to install git?

Squishy42 commented 2 years ago

Please can someone help me through the process? I would appreciate it.

TonysTechFix commented 2 years ago

Squishy42, this is what I did to get it working: (Windows 10 laptop)

Full disclosure: I'm no expert at this node lark, but this is what worked for me! Register account with github & install git. Download & install Node.JS - (Maybe, at this point I rebooted the laptop?) Open Windows command prompt, and enter the command line: npm install -g --unsafe-perm node-red (then hit Return). Once intallation has completed, enter the command line: node-red (then hit Return). This launches the Node-Red server. Now open a web browser (on the same laptop) and browse to the URL: http://localhost:1880 This should now display the Node-Red UI screen. The rest of the eWeLink setup will take place in this Node-RED UI. Within Node-RED, open the Menu (3 horizontal lines, top right of the screen), choose Manage Palette. In the Palette Management window, select the install tab. In the Search bar type eWeLink and you should see the relevant libraries listed (I chose: node-red-contrib-ewelink), then confirm to install it. Once installation has completed, you should then see the eWeLink objects / functions (nodes) listed in the left margin of Node-RED window. (They will be added to the bottom of the list of available nodes).

================ See how you progress with the above? I'm happy to assist further with implementing an eWelink connection if you get stuck.. :-)