Skip to content

Problem during installition node-rfc tool windows 11  #258

@vinibiscolla

Description

@vinibiscolla

Describe the bug
A clear and concise description of what the bug is:

R: Trying to instal the node-rfc lib but the CMake are not capable to complete the build after the npm i node-rfc, even when i got a git clone from repository.

To Reproduce
Describe how the node-rfc is installed, like locally or globally and using npm install or build from source:

R: Node-rfc was installed in both ways i have two different folders and already tested the approachs in: #166 without success, i create a generic folder with empty files made the git clone and tryed to do the npm install getting the result:

Logs - Init
Microsoft(R) Build Engine versão 17.1.0+ae57d105c para .NET Framework
Copyright (C) Microsoft Corporation. Todos os direitos reservados.

Checking Build System
Building Custom Rule C:/Users/user/Desktop/node-rfc/CMakeLists.txt
Client.cc
C:\Users\user\Desktop\node-rfc\src\Client.h(9,10): fatal error C1083: Não é possível abrir arquivo incluir: 'uv.h': No such file or directory [C:\Users\user\Desktop\node-rfc\build\sapnwrfc.vcxproj]
nwrfcsdk.cc
C:\Users\user\Desktop\node-rfc\node_modules\node-addon-api\napi.h(4,10): fatal error C1083: Não é possível abrir arquivo incluir: 'node_api.h': No such file or directory [C:\Users\user\Desktop\node-rfc
\build\sapnwrfc.vcxproj]
Pool.cc
C:\Users\user\Desktop\node-rfc\src\Pool.h(9,10): fatal error C1083: Não é possível abrir arquivo incluir: 'uv.h': No such file or directory [C:\Users\user\Desktop\node-rfc\build\sapnwrfc.vcxproj]
Throughput.cc
C:\Users\user\Desktop\node-rfc\node_modules\node-addon-api\napi.h(4,10): fatal error C1083: Não é possível abrir arquivo incluir: 'node_api.h': No such file or directory [C:\Users\user\Desktop\node-rfc
\build\sapnwrfc.vcxproj]
Server.cc
C:\Users\user\Desktop\node-rfc\src\Server.h(8,10): fatal error C1083: Não é possível abrir arquivo incluir: 'uv.h': No such file or directory [C:\Users\user\Desktop\node-rfc\build\sapnwrfc.vcxproj]
addon.cc
C:\Users\user\Desktop\node-rfc\src\Client.h(9,10): fatal error C1083: Não é possível abrir arquivo incluir: 'uv.h': No such file or directory [C:\Users\user\Desktop\node-rfc\build\sapnwrfc.vcxproj]
ERR! OMG Process terminated: 1
npm ERR! code 1
npm ERR! path C:\Users\user\Desktop\node-rfc
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c prebuild-install -r napi || cmake-js rebuild

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user\AppData\Local\npm-cache_logs\2022-04-26T15_38_07_765Z-debug-0.log

Logs - End

I have MinGW in my machine, i've installed the CMake tool in the visual studio code, so i'm capable to change the default gcc build system between MinGw and MVSC for example

Describe steps to reproduce the behavior, including the test script.

Npm Install node-rfc when i've tryed to donwload from npm.

Or even making a clone of the repo and running locally with npm install

The logs seens to work all script it has to complete, but when CMake try to find couple c classes are not able for the node header include and i've already declared this enviroment var in my system.

The logs are:

Logs - Init using the MSVC

user@user-computer MINGW64 ~/Desktop/node-rfc (main)
$ npm i

node-rfc@2.6.1 preinstall
npm install cmake-js prebuild-install prebuild node-addon-api

up to date, audited 902 packages in 3s

59 packages are looking for funding
run npm fund for details

8 vulnerabilities (1 moderate, 4 high, 3 critical)

To address issues that do not require attention, run:
npm audit fix

To address all issues (including breaking changes), run:
npm audit fix --force

Run npm audit for details.

node-rfc@2.6.1 install
prebuild-install -r napi || cmake-js rebuild

prebuild-install WARN install No prebuilt binaries found (target=6 runtime=napi arch=ia32 libc= platform=win32)
[
'C:\Program Files (x86)\nodejs\node.exe',
'C:\Users\user\Desktop\node-rfc\node_modules\cmake-js\bin\cmake-js',
'rebuild'
]
info TOOL Using Visual Studio 17 2022 generator.
info CMD CLEAN
info RUN [
info RUN 'cmake',
info RUN '-E',
info RUN 'remove_directory',
info RUN 'C:\Users\user\Desktop\node-rfc\build'
info RUN ]
info CMD CONFIGURE
info RUN [
info RUN 'cmake',
info RUN 'C:\Users\user\Desktop\node-rfc',
info RUN '--no-warn-unused-cli',
info RUN '-G',
info RUN 'Visual Studio 17 2022',
info RUN '-DCMAKE_JS_VERSION=6.3.0',
info RUN '-DCMAKE_BUILD_TYPE=Release',
info RUN '-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=C:\Users\user\Desktop\node-rfc\build',
info RUN '-DCMAKE_JS_INC=C:\Users\user\.cmake-js\node-ia32\v16.14.2\include\node',
info RUN '-DCMAKE_JS_SRC=C:/Users/user/Desktop/node-rfc/node_modules/cmake-js/lib/cpp/win_delay_load_hook.cc',
info RUN '-DNODE_RUNTIME=node',
info RUN '-DNODE_RUNTIMEVERSION=16.14.2',
info RUN '-DNODE_ARCH=ia32',
info RUN '-DCMAKE_JS_LIB=C:\Users\user\.cmake-js\node-ia32\v16.14.2\win-x86\node.lib',
info RUN '-DCMAKE_SHARED_LINKER_FLAGS=/DELAYLOAD:NODE.EXE /SAFESEH:NO'
info RUN ]
Not searching for unused variables given on the command line.
-- The C compiler identification is MSVC 19.31.31107.0
-- The CXX compiler identification is MSVC 19.31.31107.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.31.31103/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.31.31103/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
N-API version: 6 C:\node-v16.14.2\include\node
SAP NWRFC SDK: 750 Patch Level 9

-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/user/Desktop/node-rfc/build
info CMD BUILD
info RUN [
info RUN 'cmake',
info RUN '--build',
info RUN 'C:\Users\user\Desktop\node-rfc\build',
info RUN '--config',
info RUN 'Release'
info RUN ]
Microsoft(R) Build Engine versão 17.1.0+ae57d105c para .NET Framework
Copyright (C) Microsoft Corporation. Todos os direitos reservados.

npm ERR! code 1
npm ERR! path C:\Users\user\Desktop\node-rfc
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c prebuild-install -r napi || cmake-js rebuild

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user\AppData\Local\npm-cache_logs\2022-04-26T16_23_28_776Z-debug-0.log

Logs - End using the MSVC

Logs - Init using the minGW gcc compiler

$ npm i

node-rfc@2.6.1 preinstall
npm install cmake-js prebuild-install prebuild node-addon-api

up to date, audited 902 packages in 3s

59 packages are looking for funding
run npm fund for details

8 vulnerabilities (1 moderate, 4 high, 3 critical)

To address issues that do not require attention, run:
npm audit fix

To address all issues (including breaking changes), run:
npm audit fix --force

Run npm audit for details.

node-rfc@2.6.1 install
prebuild-install -r napi || cmake-js rebuild

prebuild-install WARN install No prebuilt binaries found (target=6 runtime=napi arch=ia32 libc= platform=win32)
[
'C:\Program Files (x86)\nodejs\node.exe',
'C:\Users\user\Desktop\node-rfc\node_modules\cmake-js\bin\cmake-js',
'rebuild'
]
info TOOL Using Visual Studio 17 2022 generator.
info CMD CLEAN
info RUN [
info RUN 'cmake',
info RUN '-E',
info RUN 'remove_directory',
info RUN 'C:\Users\user\Desktop\node-rfc\build'
info RUN ]
info CMD CONFIGURE
info RUN [
info RUN 'cmake',
info RUN 'C:\Users\user\Desktop\node-rfc',
info RUN '--no-warn-unused-cli',
info RUN '-G',
info RUN 'Visual Studio 17 2022',
info RUN '-DCMAKE_JS_VERSION=6.3.0',
info RUN '-DCMAKE_BUILD_TYPE=Release',
info RUN '-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=C:\Users\user\Desktop\node-rfc\build',
info RUN '-DCMAKE_JS_INC=C:\Users\user\.cmake-js\node-ia32\v16.14.2\include\node',
info RUN '-DCMAKE_JS_SRC=C:/Users/user/Desktop/node-rfc/node_modules/cmake-js/lib/cpp/win_delay_load_hook.cc',
info RUN '-DNODE_RUNTIME=node',
info RUN '-DNODE_RUNTIMEVERSION=16.14.2',
info RUN '-DNODE_ARCH=ia32',
info RUN '-DCMAKE_JS_LIB=C:\Users\user\.cmake-js\node-ia32\v16.14.2\win-x86\node.lib',
info RUN '-DCMAKE_SHARED_LINKER_FLAGS=/DELAYLOAD:NODE.EXE /SAFESEH:NO'
info RUN ]
Not searching for unused variables given on the command line.
-- The C compiler identification is MSVC 19.31.31107.0
-- The CXX compiler identification is MSVC 19.31.31107.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.31.31103/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.31.31103/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
N-API version: 6 C:\node-v16.14.2\include\node
SAP NWRFC SDK: 750 Patch Level 9

-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/user/Desktop/node-rfc/build
info CMD BUILD
info RUN [
info RUN 'cmake',
info RUN '--build',
info RUN 'C:\Users\user\Desktop\node-rfc\build',
info RUN '--config',
info RUN 'Release'
info RUN ]
Microsoft(R) Build Engine versão 17.1.0+ae57d105c para .NET Framework
Copyright (C) Microsoft Corporation. Todos os direitos reservados.

Checking Build System
Building Custom Rule C:/Users/user/Desktop/node-rfc/CMakeLists.txt
Client.cc
C:\Users\user\Desktop\node-rfc\src\Client.h(9,10): fatal error C1083: Não é possível abrir arquivo incluir: 'uv.h': No such file or directory [C:\Users\user\Desktop\node-rfc\build\sapnwrfc.vcxproj]
nwrfcsdk.cc
C:\Users\user\Desktop\node-rfc\node_modules\node-addon-api\napi.h(4,10): fatal error C1083: Não é possível abrir arquivo incluir: 'node_api.h': No such file or directory [C:\Users\user\Desktop\node-rfc
\build\sapnwrfc.vcxproj]
Pool.cc
C:\Users\user\Desktop\node-rfc\src\Pool.h(9,10): fatal error C1083: Não é possível abrir arquivo incluir: 'uv.h': No such file or directory [C:\Users\user\Desktop\node-rfc\build\sapnwrfc.vcxproj]
Throughput.cc
C:\Users\user\Desktop\node-rfc\node_modules\node-addon-api\napi.h(4,10): fatal error C1083: Não é possível abrir arquivo incluir: 'node_api.h': No such file or directory [C:\Users\user\Desktop\node-rfc
\build\sapnwrfc.vcxproj]
Server.cc
C:\Users\user\Desktop\node-rfc\src\Server.h(8,10): fatal error C1083: Não é possível abrir arquivo incluir: 'uv.h': No such file or directory [C:\Users\user\Desktop\node-rfc\build\sapnwrfc.vcxproj]
addon.cc
C:\Users\user\Desktop\node-rfc\src\Client.h(9,10): fatal error C1083: Não é possível abrir arquivo incluir: 'uv.h': No such file or directory [C:\Users\user\Desktop\node-rfc\build\sapnwrfc.vcxproj]
ERR! OMG Process terminated: 1
npm ERR! code 1
npm ERR! path C:\Users\user\Desktop\node-rfc
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c prebuild-install -r napi || cmake-js rebuild

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user\AppData\Local\npm-cache_logs\2022-04-26T16_38_11_679Z-debug-0.log

Logs - End using the minGW gcc compiler

Screenshots
If applicable, add screenshots to help explain your problem.

Environment

  • The output of node -p "require('node-rfc').environment"

$ node -p "require('node-rfc').environment"
node:internal/modules/cjs/loader:936
throw err;
^

Error: Cannot find module 'node-rfc'
Require stack:

  • C:\Users\user\Desktop\node-rfc[eval]
    ←[90m at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)←[39m
    ←[90m at Function.Module._load (node:internal/modules/cjs/loader:778:27)←[39m
    ←[90m at Module.require (node:internal/modules/cjs/loader:1005:19)←[39m
    ←[90m at require (node:internal/modules/cjs/helpers:102:18)←[39m
    at [eval]:1:1
    ←[90m at Script.runInThisContext (node:vm:129:12)←[39m
    ←[90m at Object.runInThisContext (node:vm:305:38)←[39m
    ←[90m at node:internal/process/execution:76:19←[39m
    at [eval]-wrapper:6:22
    ←[90m at evalScript (node:internal/process/execution:75:60)←[39m {
    code: ←[32m'MODULE_NOT_FOUND'←[39m,
    requireStack: [ ←[32m'C:\Users\user\Desktop\node-rfc\[eval]'←[39m ]
    }

The above are from clone git repo, from a npm install command line package download are:

$ node -p "require('node-rfc').environment"
C:\temp\node-rfc-main\lib\wrapper\noderfc-bindings.js:46
throw err;
^

Error: Cannot find module '../binding/sapnwrfc'
Require stack:

  • C:\temp\node-rfc-main\lib\wrapper\noderfc-bindings.js
  • C:\temp\node-rfc-main\lib\index.js
  • C:\test[eval]
    environment: {
    "platform": {
    "name": "win32",
    "arch": "ia32",
    "release": "10.0.22000"
    },
    "env": {
    "SAPNWRFC_HOME": "C:\nwrfcsdk\lib",
    "RFC_INI": "",
    "nwrfcsdk_lib_on_path": false
    },
    "versions": {
    "node": "16.14.2",
    "v8": "9.4.146.24-node.20",
    "uv": "1.43.0",
    "zlib": "1.2.11",
    "brotli": "1.0.9",
    "ares": "1.18.1",
    "modules": "93",
    "nghttp2": "1.45.1",
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object. (C:\temp\node-rfc-main\lib\wrapper\noderfc-bindings.js:36:49)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object. (C:\temp\node-rfc-main\lib\index.js:20:14)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    'C:\temp\node-rfc-main\lib\wrapper\noderfc-bindings.js',
    'C:\temp\node-rfc-main\lib\index.js',
    'C:\test\[eval]'
    ]
    }

$ npm -g prefix
C:\Users\user\AppData\Roaming\npm

$ npx envinfo

System:
OS: Windows 10 10.0.22000
CPU: (8) ia32 11th Gen Intel(R) Core(TM) i7-11390H @ 3.40GHz
Memory: 1.94 GB / 15.74 GB
Binaries:
Node: 16.14.2 - C:\Program Files (x86)\nodejs\node.EXE
npm: 8.7.0 - C:\Program Files (x86)\nodejs\npm.CMD
Managers:
pip2: 19.2.3 - C:\Python27\Scripts\pip2.EXE
pip3: 22.0.4
Utilities:
CMake: 3.23.1 - C:\Program Files\CMake\bin\cmake.EXE
Git: 2.34.1. - C:\Program Files\Git\mingw64\bin\git.EXE
IDEs:
Android Studio: Version 2021.1.0.0 AI-211.7628.21.2111.8193401
VSCode: 1.66.2 - C:\Users\user\AppData\Local\Programs\Microsoft VS Code\bin\code.CMD
Visual Studio: 15.9.28307.1927 (Visual Studio Community 2017), 17.1.32414.318 (Visual Studio Community 2022)
Languages:
Bash: 4.4.23 - C:\Program Files\Git\usr\bin\bash.EXE
Java: 17.0.1 - C:\Program Files\Common Files\Oracle\Java\javapath\javac.EXE
Perl: 5.34.0 - C:\Program Files\Git\usr\bin\perl.EXE
Python: 2.7.18 - C:\Python27\python.EXE
Python3: 3.9.12
Browsers:
Edge: Spartan (44.22000.120.0), Chromium (100.0.1185.50)
Internet Explorer: 11.0.22000.120

Additional context
Add any other context about the problem here.

Did all research available in the internet, read most of the issues already reported, try to follow the most troubleshoot possible and yet not able to make the build compile process of the lib works, i've could already couple years ago made this lib works with the sapnwrfc lib, and did not have all of this problems, pretty sure that the problem is in the CMake when try to get the node include files.

I've changed my oficial machine name to "user" for privacy reasos, if the logs are hard to read just let me know and i can send or share with the responsible one via e-mail or some other source.

Thanks a lot.
Regards.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions