Skip to Content
0

Unable to build NodeJS module with XSJS support on HANA XSA SP12

Feb 23 at 09:02 PM

114

avatar image

Hi HANA Folks,

Been struggling while trying to build an MTAR project via WebIDE on HANA XSA SP12.

If I add a NodeJS module on my project without support for XSJS, everything goes well. However, when I enable support for XSJS, the build fails. Apparently it is no being capable of building the sap-node-jwt module due to missing pieces:

No rule to make target 'Release/obj.target/jwt/src/jwt_wrap.o', needed by 'Release/obj.target/jwt.node'. Stop. 

I googled this error and I all I could find was that I should update by node/npm to the latest and check the file "binding.gyp" for any typos. I know node/npm versions come with upgrading the XSA runtime package I am able to download from here:

SAP HANA PLATFORM EDITION --> SAP HANA PLATFORM EDIT. 1.0 --> XS ADVANCED RUNTIME --> SAP EXTENDED APP SERVICES 1

I have tried installing version 71 on top of 24 and was unable to do it. I complains about a missing service. Then I installed 58 (which upgraded NodeJS runtime from 4.4.0 to 4.8.3). However, the error remained the same. So I ungraded the XSA runtime to 63. Still, the the same issue and Node now is the same. Any ideas?

BTW: I am stuck with SP12 - so this has to work, just like in openSAP HANA5.

The related node error message:

npm info install sap-node-jwt@0.7.1
 
 
 sap-node-jwt@0.7.1 install /hana/shared/NWF/xs/ea_data/luna751/executionroot/2af9be8f-ddf4-4fd0-ade0-432e39c5b9ba/app/tomcat/temp/builder/sap.nodejs/builds/build-5171278390779241905/xsjs/node_modules/sap-xsjs-test/node_modules/sap-hdbext/node_modules/sap-xssec/node_modules/sap-node-jwt
 
 node ./build.js
 
 sh: mc: line 1: syntax error: unexpected end of file
 sh: error importing function definition for `mc'
 `linux-x64-v8-4.5` exists; testing
 (node) child_process: options.customFds option is deprecated. Use options.stdio instead.
 sh: mc: line 1: syntax error: unexpected end of file
 sh: error importing function definition for `mc'
 gyp info it worked if it ends with ok
 gyp info using node-gyp@3.4.0
 gyp info using node@4.8.3 | linux | x64
 gyp info spawn /usr/sap/NWF/HDB00/exe/Python/bin/python2
 gyp info spawn args [ '/hana/shared/NWF/xs/ea_data/luna751/executionroot/2af9be8f-ddf4-4fd0-ade0-432e39c5b9ba/app/resources/nodejs/vendor/node4.8/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
 gyp info spawn args 'binding.gyp',
 gyp info spawn args '-f',
 gyp info spawn args 'make',
 gyp info spawn args '-I',
 gyp info spawn args '/hana/shared/NWF/xs/ea_data/luna751/executionroot/2af9be8f-ddf4-4fd0-ade0-432e39c5b9ba/app/tomcat/temp/builder/sap.nodejs/builds/build-5171278390779241905/xsjs/node_modules/sap-xsjs-test/node_modules/sap-hdbext/node_modules/sap-xssec/node_modules/sap-node-jwt/build/config.gypi',
 gyp info spawn args '-I',
 gyp info spawn args '/hana/shared/NWF/xs/ea_data/luna751/executionroot/2af9be8f-ddf4-4fd0-ade0-432e39c5b9ba/app/resources/nodejs/vendor/node4.8/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
 gyp info spawn args '-I',
 gyp info spawn args '/hana/shared/NWF/xs/ea_data/luna751/executionroot/2af9be8f-ddf4-4fd0-ade0-432e39c5b9ba/app/resources/nodejs/vendor/node4.8/lib/node-gyp/include/node/common.gypi',
 gyp info spawn args '-Dlibrary=shared_library',
 gyp info spawn args '-Dvisibility=default',
 gyp info spawn args '-Dnode_root_dir=/hana/shared/NWF/xs/ea_data/luna751/executionroot/2af9be8f-ddf4-4fd0-ade0-432e39c5b9ba/app/resources/nodejs/vendor/node4.8/lib/node-gyp',
 gyp info spawn args '-Dnode_gyp_dir=/hana/shared/NWF/xs/ea_data/luna751/executionroot/2af9be8f-ddf4-4fd0-ade0-432e39c5b9ba/app/resources/nodejs/vendor/node4.8/lib/node_modules/npm/node_modules/node-gyp',
 gyp info spawn args '-Dnode_lib_file=node.lib',
 gyp info spawn args '-Dmodule_root_dir=/hana/shared/NWF/xs/ea_data/luna751/executionroot/2af9be8f-ddf4-4fd0-ade0-432e39c5b9ba/app/tomcat/temp/builder/sap.nodejs/builds/build-5171278390779241905/xsjs/node_modules/sap-xsjs-test/node_modules/sap-hdbext/node_modules/sap-xssec/node_modules/sap-node-jwt',
 gyp info spawn args '--depth=.',
 gyp info spawn args '--no-parallel',
 gyp info spawn args '--generator-output',
 gyp info spawn args 'build',
 gyp info spawn args '-Goutput_dir=.' ]
 gyp info spawn make
 gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
 make: Entering directory '/hana/shared/NWF/xs/ea_data/luna751/executionroot/2af9be8f-ddf4-4fd0-ade0-432e39c5b9ba/app/tomcat/temp/builder/sap.nodejs/builds/build-5171278390779241905/xsjs/node_modules/sap-xsjs-test/node_modules/sap-hdbext/node_modules/sap-xssec/node_modules/sap-node-jwt/build'
 make: *** No rule to make target 'Release/obj.target/jwt/src/jwt_wrap.o', needed by 'Release/obj.target/jwt.node'. Stop.
 make: Leaving directory '/hana/shared/NWF/xs/ea_data/luna751/executionroot/2af9be8f-ddf4-4fd0-ade0-432e39c5b9ba/app/tomcat/temp/builder/sap.nodejs/builds/build-5171278390779241905/xsjs/node_modules/sap-xsjs-test/node_modules/sap-hdbext/node_modules/sap-xssec/node_modules/sap-node-jwt/build'
 gyp ERR! build error 
 gyp ERR! stack Error: `make` failed with exit code: 2
 gyp ERR! stack at ChildProcess.onExit (/hana/shared/NWF/xs/ea_data/luna751/executionroot/2af9be8f-ddf4-4fd0-ade0-432e39c5b9ba/app/resources/nodejs/vendor/node4.8/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
 gyp ERR! stack at emitTwo (events.js:87:13)
 gyp ERR! stack at ChildProcess.emit (events.js:172:7)
 gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:12)
 gyp ERR! System Linux 4.4.21-84-default
 gyp ERR! command "node" "/hana/shared/NWF/xs/ea_data/luna751/executionroot/2af9be8f-ddf4-4fd0-ade0-432e39c5b9ba/app/resources/nodejs/vendor/node4.8/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
 gyp ERR! cwd /hana/shared/NWF/xs/ea_data/luna751/executionroot/2af9be8f-ddf4-4fd0-ade0-432e39c5b9ba/app/tomcat/temp/builder/sap.nodejs/builds/build-5171278390779241905/xsjs/node_modules/sap-xsjs-test/node_modules/sap-hdbext/node_modules/sap-xssec/node_modules/sap-node-jwt
 gyp ERR! node -v v4.8.3
 gyp ERR! node-gyp -v v3.4.0
 gyp ERR! not ok 
 Build failed

Regards,
Ivan

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Ivan Mirisola
Jun 04 at 02:44 PM
0

Issue was solved!

1) Midnight Commander was installed on the linux box. I kept seeing error like:

 sh: mc: line 1: syntax error: unexpected end of file
 sh: error importing function definition for `mc'

Removed it and now the build works.

Regards,
Ivan

Share
10 |10000 characters needed characters left characters exceeded