cancel
Showing results for 
Search instead for 
Did you mean: 

Error while building and deploying "@sap/xsjs" dependency in bas

Jidnyasa
Explorer
0 Kudos

I am migrating xsjs services from neo to cf environment through xsjs compatibility layer in BAS. I have clone this GitHub repository https://github.com/saphanaacademy/scpapps.git and followed all the steps provided in this blog SAP BTP Developer Onboarding II | Hands-on Video Tutorials | SAP Blogs. But when I am trying to execute npm install, I am getting following error.

user: srv $ npm i
npm ERR! code 1
npm ERR! path /home/user/projects/SDS/srv/node_modules/@sap/xsjs/node_modules/@sap/fibers
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@8.4.0
npm ERR! gyp info using node@14.17.6 | linux | x64
npm ERR! gyp ERR! find Python 
npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration
npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON
npm ERR! gyp ERR! find Python checking if "python3" can be used
npm ERR! gyp ERR! find Python - "python3" is not in PATH or produced an error
npm ERR! gyp ERR! find Python checking if "python" can be used
npm ERR! gyp ERR! find Python - executable path is "/usr/bin/python"
npm ERR! gyp ERR! find Python - version is "2.7.16"
npm ERR! gyp ERR! find Python - version is 2.7.16 - should be >=3.6.0
npm ERR! gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED
npm ERR! gyp ERR! find Python 
npm ERR! gyp ERR! find Python **********************************************************
npm ERR! gyp ERR! find Python You need to install the latest version of Python.
npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
npm ERR! gyp ERR! find Python you can try one of the following options:
npm ERR! gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
npm ERR! gyp ERR! find Python   (accepted by both node-gyp and npm)
npm ERR! gyp ERR! find Python - Set the environment variable PYTHON
npm ERR! gyp ERR! find Python - Set the npm configuration variable python:
npm ERR! gyp ERR! find Python   npm config set python "/path/to/pythonexecutable"
npm ERR! gyp ERR! find Python For more information consult the documentation at:
npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
npm ERR! gyp ERR! find Python **********************************************************
npm ERR! gyp ERR! find Python 
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: Could not find any Python installation to use
npm ERR! gyp ERR! stack     at PythonFinder.fail (/home/user/.node_modules_global/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:330:47)
npm ERR! gyp ERR! stack     at PythonFinder.runChecks (/home/user/.node_modules_global/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:159:21)
npm ERR! gyp ERR! stack     at PythonFinder.<anonymous> (/home/user/.node_modules_global/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:266:16)
npm ERR! gyp ERR! stack     at PythonFinder.execFileCallback (/home/user/.node_modules_global/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:297:7)
npm ERR! gyp ERR! stack     at ChildProcess.exithandler (child_process.js:381:7)
npm ERR! gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
npm ERR! gyp ERR! stack     at maybeClose (internal/child_process.js:1055:16)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
npm ERR! gyp ERR! System Linux 5.4.0-6-cloud-amd64
npm ERR! gyp ERR! command "/opt/nodejs/node-v14.17.6-linux-x64/bin/node" "/home/user/.node_modules_global/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /home/user/projects/SDS/srv/node_modules/@sap/xsjs/node_modules/@sap/fibers
npm ERR! gyp ERR! node -v v14.17.6
npm ERR! gyp ERR! node-gyp -v v8.4.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/user/.npm/_logs/2021-11-29T05_35_37_717Z-debug.log<br>
View Entire Topic
axitycesarfelce
Participant
0 Kudos

Hi jidnyasa

Did you could solve your problem? I'm facing the same issue right now!Regards,