jdorner / node-sapnwrfc

SAP Netweaver RFC SDK bindings for Node.js
MIT License
55 stars 23 forks source link

NPM Install Compile Error #26

Open donaldhook opened 8 years ago

donaldhook commented 8 years ago

I am trying to install sapnwrfc and am getting the error below. I see other similar issues that were closed but not sure what was done to resolve the issue. I am running on Windows 2012 x64, Node 5.2, JDK 8u66 with VS 2015.

Any help is appreciated!

C:\Boelter Applications\BoelterIntegrationServer>npm install sapnwrfc

sapnwrfc@0.2.0 install C:\Boelter Applications\BoelterIntegrationServer\node_m odules\sapnwrfc node preinstall.js

C:\Boelter Applications\BoelterIntegrationServer\node_modules\sapnwrfc>if not de fined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\no de-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" clean ) else (node cl ean ) { [Error: Could not locate the bindings file. Tried: → C:\Boelter Applications\BoelterIntegrationServer\node_modules\sapnwrfc\build\ sapnwrfc.node → C:\Boelter Applications\BoelterIntegrationServer\node_modules\sapnwrfc\build\ Debug\sapnwrfc.node → C:\Boelter Applications\BoelterIntegrationServer\node_modules\sapnwrfc\build\ Release\sapnwrfc.node → C:\Boelter Applications\BoelterIntegrationServer\node_modules\sapnwrfc\out\De bug\sapnwrfc.node → C:\Boelter Applications\BoelterIntegrationServer\node_modules\sapnwrfc\Debug\ sapnwrfc.node → C:\Boelter Applications\BoelterIntegrationServer\node_modules\sapnwrfc\out\Re lease\sapnwrfc.node → C:\Boelter Applications\BoelterIntegrationServer\node_modules\sapnwrfc\Releas e\sapnwrfc.node → C:\Boelter Applications\BoelterIntegrationServer\node_modules\sapnwrfc\build\ default\sapnwrfc.node → C:\Boelter Applications\BoelterIntegrationServer\node_modules\sapnwrfc\compil ed\5.2\win32\x64\sapnwrfc.node] tries: [ 'C:\Boelter Applications\BoelterIntegrationServer\node_modules\sapnwrfc \build\sapnwrfc.node', 'C:\Boelter Applications\BoelterIntegrationServer\node_modules\sapnwrfc \build\Debug\sapnwrfc.node', 'C:\Boelter Applications\BoelterIntegrationServer\node_modules\sapnwrfc \build\Release\sapnwrfc.node', 'C:\Boelter Applications\BoelterIntegrationServer\node_modules\sapnwrfc \out\Debug\sapnwrfc.node', 'C:\Boelter Applications\BoelterIntegrationServer\node_modules\sapnwrfc \Debug\sapnwrfc.node', 'C:\Boelter Applications\BoelterIntegrationServer\node_modules\sapnwrfc \out\Release\sapnwrfc.node', 'C:\Boelter Applications\BoelterIntegrationServer\node_modules\sapnwrfc \Release\sapnwrfc.node', 'C:\Boelter Applications\BoelterIntegrationServer\node_modules\sapnwrfc \build\default\sapnwrfc.node', 'C:\Boelter Applications\BoelterIntegrationServer\node_modules\sapnwrfc \compiled\5.2\win32\x64\sapnwrfc.node' ] } error a precompiled module could not be found or loaded info trying to compile it...

C:\Boelter Applications\BoelterIntegrationServer\node_modules\sapnwrfc>if not de fined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\no de-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild ) Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. binding.cc Connection.cc c:\boelter applications\boelterintegrationserver\node_modules\sapnwrfc\src\Comm on.h(30): fatal error C1083: Cannot open include file: 'sapnwrfc.h': No such fi le or directory (compiling source file ..\src\Connection.cc) [C:\Boelter Applic ations\BoelterIntegrationServer\node_modules\sapnwrfc\build\sapnwrfc.vcxproj] Function.cc c:\boelter applications\boelterintegrationserver\node_modules\sapnwrfc\src\Comm on.h(30): fatal error C1083: Cannot open include file: 'sapnwrfc.h': No such fi le or directory (compiling source file ..\src\binding.cc) [C:\Boelter Applicati ons\BoelterIntegrationServer\node_modules\sapnwrfc\build\sapnwrfc.vcxproj] c:\boelter applications\boelterintegrationserver\node_modules\sapnwrfc\src\Comm on.h(30): fatal error C1083: Cannot open include file: 'sapnwrfc.h': No such fi le or directory (compiling source file ..\src\Function.cc) [C:\Boelter Applicat ions\BoelterIntegrationServer\node_modules\sapnwrfc\build\sapnwrfc.vcxproj] gyp ERR! build error gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe fail ed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\ npm\node_modules\node-gyp\lib\build.js:270:23) gyp ERR! stack at emitTwo (events.js:88:13) gyp ERR! stack at ChildProcess.emit (events.js:173:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces s.js:201:12) gyp ERR! System Windows_NT 6.3.9600 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodej s\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd C:\Boelter Applications\BoelterIntegrationServer\node_modules\sapnw rfc gyp ERR! node -v v5.2.0 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok boelterintegrationserver@1.0.0 C:\Boelter Applications\BoelterIntegrationServer └── sapnwrfc@0.2.0 extraneous

C:\Boelter Applications\BoelterIntegrationServer>

joystick commented 8 years ago

Hi, try this:

This will rebuild your module. Best wishes, Alex

Laurent314 commented 3 years ago

Old post, but I have similar issue

Solution with environment variable (adapt the path to the NW RFC folder)

set CL=/IC:\usr\sap\nwrfcsdk64\include
npm install sapnwrfc

Laurent