SAP / node-rfc

Asynchronous, non-blocking SAP NW RFC SDK bindings for Node.js
Apache License 2.0
249 stars 73 forks source link

Installation problems: tried with npm and local file on Windows 10 #261

Closed tvormweg closed 1 year ago

tvormweg commented 1 year ago

Describe the bug II just wanted to upgrade to latest version, but unfortunately I cannot install node-rfc, neither via npm install nor via cloning the repository anymore. Installing any other npm module works flawlessly.

Same setup, same versions on another windows laptop: all worked - reinstalled node/ npm on both laptops 2 times. With same blank default setup of node & npm it should work in all environments the same...

Update I could reproduce the bug on my blank second laptop. Looks like its related to updating npm to v8.15.0

  1. Install latest Node LTS
  2. Upgrade NPM (with is by default 8.11) with "npm install npm@latest -g" to 8.15.
  3. Mkdir, npm init -y & npm install node-rfc will fail

How to fix: Downgrading with "npm install npm@8.11.0" didn't solve the problem, even with cleaning cache before retrying to install node-rfc. That's what I did to magically solve this:

  1. Windows remove Node.JS
  2. Delete all npm & node related folders in %appdata%
  3. Delete choco
  4. Reboot
  5. Install Node.JS latest LTS, stayed with npm 8.11
  6. Rebott
  7. npm install node-rfc worked. (Finally after 4 hours of log reading & trial & error.....)

To Reproduce npm install always failes after a while with a large err tree: image

Every of those "dependency.cmd" contains: "@echo off npm install --save bluebird node-addon-api prebuild-install", which at its own executes flawlessly again.

Looking into the various log files that has been generated by those errors the only thing that has been interesting is, that command npm couldnt be found (see at the end of the log file). For sure I checked that "npm" is available in all CLIs. I also tried to run command as admin. No effect.

155 error path C:\Users\timov\ws\node-rfc
156 error command failed
157 error command C:\Windows\system32\cmd.exe /d /s /c C:\Users\timov\AppData\Local\Temp\dependencies-48010e6a.cmd
158 error npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
158 error npm ERR! code 1
158 error npm ERR! path C:\Users\timov\ws\node-rfc
158 error npm ERR! command failed
158 error npm ERR! command C:\Windows\system32\cmd.exe /d /s /c C:\Users\timov\AppData\Local\Temp\dependencies-6d39993b.cmd
158 error npm ERR! npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
158 error npm ERR! npm ERR! code 1
158 error npm ERR! npm ERR! path C:\Users\timov\ws\node-rfc
158 error npm ERR! npm ERR! command failed
158 error npm ERR! npm ERR! command C:\Windows\system32\cmd.exe /d /s /c C:\Users\timov\AppData\Local\Temp\dependencies-a647753a.cmd
158 error npm ERR! npm ERR! Der Befehl "npm" ist entweder falsch geschrieben oder
158 error npm ERR! npm ERR! konnte nicht gefunden werden.
158 error npm ERR! 

2022-07-21T13_29_01_574Z-debug-0.log

Environemt Win 10, latest stable node & npm. Never had problems installing node-rfc before. Using latest LTS node version.

bsrdjan commented 1 year ago

I could reproduce on Windows only, no issues on Darwin. It looks like npm bug, created new issue there.

grenik commented 1 year ago

I can confirm the same issue on Cloud Foundry with npm 8.14.0 and 8.15.0: it runs out of memory after a while. npm 8.13.2 is the latest working version.