cancel
Showing results for 
Search instead for 
Did you mean: 

Errors buiilding and deployng devDependencies "@sap/xsjs-test": "^3.0.2" Sap Cloud Platform

I'm trying to deploy xsodata and xsjs service but I'm having this problem when I tried to deploy.

16:37:14 (Project Space) Workspace settings set successfully

16:37:27 (Executor) The "npm install" process started.

16:37:30 (Provision) Service provisioning for module: "/xsjs"

16:37:30 (Provision) No service instance will be created for the 'B2BPYMT_GATEWAY' resource of the 'org.cloudfoundry.existing-service' type.

16:37:30 (Provision) Service instance 'b2b-backend-test-hdidb-S0007929676D8IFVCzcaYVxy8VP' for resource 'b2b-backend-test-hdidb-S0007929676D8IFVCzcaYVxy8VP' already exists, no operation will be performed.

16:37:30 (Executor) Starting process: "cd /projects/b2b-backend-test/xsjs; export npm_config_loglevel=notice; npm install --no-save && ( mkdir -p 3261622339183730010; rm -f 3261622339183730010/application_archive.zip; zip -rq 3261622339183730010/application_archive.zip .)"

16:37:32 (Executor) npm WARN deprecated istanbul@0.4.5: This module is no longer maintained, try this instead:

16:37:32 (Executor) npm WARN deprecated   npm i nyc

16:37:32 (Executor) npm WARN deprecated Visit https://istanbul.js.org/integrations for other alternatives.

16:37:36 (Executor) 

16:37:36 (Executor) > @sap/fibers@2.0.2-0 preinstall /projects/b2b-backend-test/xsjs/node_modules/@sap/xsjs-test/node_modules/@sap/fibers

16:37:36 (Executor) > node preinstall.js

16:37:36 (Executor) 

16:37:36 (Executor) 

16:37:36 (Executor) > @sap/hana-client@2.4.182 install /projects/b2b-backend-test/xsjs/node_modules/@sap/hdbext/node_modules/@sap/hana-client

16:37:36 (Executor) > node checkbuild.js

16:37:36 (Executor) 

16:37:36 (Executor) 

16:37:36 (Executor) > @sap/fibers@2.0.2-0 install /projects/b2b-backend-test/xsjs/node_modules/@sap/xsjs-test/node_modules/@sap/fibers

16:37:36 (Executor) > node build.js || nodejs build.js

16:37:36 (Executor) 

16:37:37 (Executor) gyp ERR! configure error 

16:37:37 (Executor) gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.

16:37:37 (Executor) gyp ERR! stack     at PythonFinder.failNoPython (/usr/local/lib/node10/node-v10.14.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:484:19)

16:37:37 (Executor) gyp ERR! stack     at PythonFinder.<anonymous> (/usr/local/lib/node10/node-v10.14.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:406:16)

16:37:37 (Executor) gyp ERR! stack     at F (/usr/local/lib/node10/node-v10.14.1-linux-x64/lib/node_modules/npm/node_modules/which/which.js:68:16)

16:37:37 (Executor) gyp ERR! stack     at E (/usr/local/lib/node10/node-v10.14.1-linux-x64/lib/node_modules/npm/node_modules/which/which.js:80:29)

16:37:37 (Executor) gyp ERR! stack     at /usr/local/lib/node10/node-v10.14.1-linux-x64/lib/node_modules/npm/node_modules/which/which.js:89:16

16:37:37 (Executor) gyp ERR! stack     at /usr/local/lib/node10/node-v10.14.1-linux-x64/lib/node_modules/npm/node_modules/isexe/index.js:42:5

16:37:37 (Executor) gyp ERR! stack     at /usr/local/lib/node10/node-v10.14.1-linux-x64/lib/node_modules/npm/node_modules/isexe/mode.js:8:5

16:37:37 (Executor) gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:154:21)

16:37:37 (Executor) gyp ERR! System Linux 4.19.86-coreos

16:37:37 (Executor) gyp ERR! command "/usr/local/lib/node10/node-v10.14.1-linux-x64/bin/node" "/usr/local/lib/node10/node-v10.14.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"

16:37:37 (Executor) gyp ERR! cwd /projects/b2b-backend-test/xsjs/node_modules/@sap/xsjs-test/node_modules/@sap/fibers

16:37:37 (Executor) gyp ERR! node -v v10.14.1

16:37:37 (Executor) gyp ERR! node-gyp -v v3.8.0

16:37:37 (Executor) gyp ERR! not ok 

16:37:37 (Executor) node-gyp exited with code: 1

16:37:37 (Executor) Please make sure you are using a supported platform and node version. If you

16:37:37 (Executor) would like to compile fibers on this machine please make sure you have setup your

16:37:37 (Executor) build environment--

16:37:37 (Executor) Windows + OS X instructions here: https://github.com/nodejs/node-gyp

16:37:37 (Executor) Ubuntu users please run: `sudo apt-get install g++ build-essential`

16:37:37 (Executor) Alpine users please run: `sudo apk add python make g++`

16:37:37 (Executor) sh: nodejs: command not found

16:37:37 (Executor) npm WARN xsjs@1.0.0 No repository field.

16:37:37 (Executor) npm WARN xsjs@1.0.0 No license field.

16:37:37 (Executor) 

16:37:37 (Executor) npm ERR! file sh

16:37:37 (Executor) npm ERR! code ELIFECYCLE

16:37:37 (Executor) npm ERR! errno ENOENT

16:37:37 (Executor) npm ERR! syscall spawn

16:37:37 (Executor) npm ERR! @sap/fibers@2.0.2-0 install: `node build.js || nodejs build.js`

16:37:37 (Executor) npm ERR! spawn ENOENT

16:37:37 (Executor) npm ERR! 

16:37:37 (Executor) npm ERR! Failed at the @sap/fibers@2.0.2-0 install script.

16:37:37 (Executor) npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

16:37:37 (Executor) 

16:37:37 (Executor) npm ERR! A complete log of this run can be found in:

16:37:37 (Executor) npm ERR!     /home/user/.npm/_logs/2020-03-16T22_37_38_768Z-debug.log

16:37:37 (Run preparation) Run preparation failed: The "npm install" process finished with code 1

0 Kudos

Yes Eder even i am facing the same issue when i tried yesterday and now even with a new project when you run a node.js module. Someone from dev team can help.

david_kunz2
Advisor
Advisor
0 Kudos

Hi,

Can you please share your package.json file? (in particular the dependencies).
It appears there is a problem with `@sap/fibers` trying to use Python, which is not installed.

Thanks a lot!
Best regards,
David

mani_ac
Participant
0 Kudos

Even I am getting the same issue , fails at python. Yesterday I noticed a build pack has been changed when I tried to deploy ,prompted me to change node version from 8 to 10. I get issue at sap/hana-client module

0 Kudos

david.kunz2,

This is my package json

{
  "dependencies": {
    "@sap/xsenv": "^2.0.0",
    "@sap/xsjs": "^5.2.0"
  },
  "description": "my description",
  "devDependencies": {
    "@sap/xsjs-test": "^3.0.2"
  },
  "files": [],
  "main": "server.js",
  "name": "xodata",
  "scripts": {
    "start": "node server.js",
    "test": "node testrun.js"
  },
  "engines": {
    "node": "10.x"
  },
  "version": "1.0.0" 
}
david_kunz2
Advisor
Advisor
0 Kudos

Hi,

The problem is `@sap/xsjs` which has a dependency to `@sap/fibers: 4.0.3-0`. The latter causes a problem with Python. Maybe the xsjs colleagues can help out?

Best regards,
David

0 Kudos

Hello! we have exactly the same error since yesterday, my package.json

{
  "dependencies": {
    "@sap/xsenv": "^2.0.0",
    "@sap/xsjs": "^5.2.0"
  },
  "description": "my description",
  "devDependencies": {
    "@sap/xsjs-test": "^3.0.2"
  },
  "files": [],
  "main": "server.js",
  "name": "nodejs",
  "scripts": {
    "start": "node server.js",
    "test": "node testrun.js"
  },
  "engines": {
    "node": "8.x"
  },
  "version": "1.0.0"
}
thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

You just need to edit the package.json. That's where the version specification that will be used at run or deploy time is stored.

Accepted Solutions (1)

Accepted Solutions (1)

Hello,

in package.json I changed the node version from 8.x to 10.x, I also removed:

  "devDependencies": {
    "@sap/xsjs-test": "^3.0.2"
  },

and

"test": "node testrun.js"

my package.json looks like this:

{
  "dependencies": {
    "@sap/xsenv": "^2.0.0",
    "@sap/xsjs": "^5.2.0"
  },
  "description": "my description",
  "files": [],
  "main": "server.js",
  "name": "nodejs",
  "scripts": {
    "start": "node server.js"
  },
  "engines": {
    "node": "10.x"
  },
  "version": "1.0.0"
}

after that I managed to build and deploy my application


I believe the python dependency comes from "@ sap / xsjs-test": "^ 3.0.2"

Wagner,

I had to do the same and It worked.

But I would like to have some reference updates from SAP WEB IDE / LIBRARIES to stay adviced before I could have this problems.

Do someone know?

Thank for your help.

Answers (2)

Answers (2)

thomas_jung
Developer Advocate
Developer Advocate

Yes please do update to node version 10. Instead of removing @sap/xsjs-test you can also update to version 3.1.2 or newer. This should address this issue. On a side note for anyone running to similar errors when building a DB module, then be sure to update the package.json in that module to go to @sap/hdi-deploy version 3.11.2 or higher.

raveeshsaurabh3
Active Participant
0 Kudos

Hi Thomas,

Your inputs helped me. I was struggling for exactly the same issue for last two days. I changed the node version to 10 and version 3.1.2 for @sap/xsjs-test. This solved the issue for me. Can we try fixing this in the generated code so that this unnecessary struggle can be avoided.

My package.json looks like below.

Thanks & Warm Regards

Raveesh

{
	"dependencies": {
		"@sap/xsenv": "^2.0.0",
		"@sap/xsjs": "^5.2.0"
	},
	"description": "my description",
	"devDependencies": {
		"@sap/xsjs-test": "^3.1.2"
	},
	"files": [],
	"main": "server.js",
	"name": "xsjs",
	"scripts": {
		"start": "node server.js",
		"test": "node testrun.js"
	},
	"engines": {
		"node": "10.x"
	},
	"version": "1.0.0"
}

gregorw
Active Contributor
0 Kudos

Hi raveesh.saurabh3,

I would suggest that you file an incident to get this change implemented in the generated code (would be great if you name the tool you're using to generate the code).

Best regards
Gregor

gregorw
Active Contributor

As you see in the xsjs/CHANGELOG.md the support for Node.js versions 6.x and 8.x was removed. I would suggest opening an incident via the service marketplace to get the issue fixed.

0 Kudos

Gregor,

I have 10.x Node js version but I got the same error. I had to remove de dev dependencie @sap/xsjs-test of my packge json. Then the error dissapeared.

{
  "dependencies": {
    "@sap/xsenv": "^2.0.0",
    "@sap/xsjs": "^5.2.0"
  },
  "description": "my description",
  "files": [],
  "main": "server.js",
  "name": "xodata",
  "scripts": {
    "start": "node server.js",
    "test": "node testrun.js"
  },
  "engines": {
    "node": "10.x"
  },
  "version": "1.0.0"
}