cancel
Showing results for 
Search instead for 
Did you mean: 

CLD200 - Manual Deployment keeps erroring out

dhrubajyoti
Advisor
Advisor
0 Kudos

SAP Extension Suite 

I am going through the CLD200 documentation stepwise and building the sample application. It has been working properly, until I get to the Manual Deployment chapter.

Issue#1: The cf push command from page #156 from the document keeps failing. When I run the cf push command, I get the below error:

user: risk-management $ cf push

Pushing apps risk-management-srv, risk-management-db-deployer to org 20afb725trial / space dev as dhrubajyoti.basak@sap.com...

Applying manifest file /home/user/projects/risk-management/manifest.yml...

Manifest applied

Packaging files to upload...

Uploading files...

9.24 KiB / 9.24 KiB 100.00% 1s

 

Waiting for API to complete processing files...

 

Staging app and tracing logs...

Downloading nodejs_buildpack...

Downloaded nodejs_buildpack

Cell 5ddf71ab-938b-4a0b-bfba-5933153fd5a9 creating container for instance cc92ccaf-1a67-403e-8b7a-66172f1e59ea

Cell 5ddf71ab-938b-4a0b-bfba-5933153fd5a9 successfully created container for instance cc92ccaf-1a67-403e-8b7a-66172f1e59ea

Downloading app package...

Downloaded app package (327.8K)

-----> Nodejs Buildpack version 1.7.63

-----> Installing binaries

engines.node (package.json): >=12.18

engines.npm (package.json): unspecified (use default)

**WARNING** Dangerous semver range (>) in engines.node. See: http://docs.cloudfoundry.org/buildpacks/node/node-tips.html

-----> Installing node 16.11.1

Copy [/tmp/buildpacks/b5d6a61786998958022dd900561c3bef/dependencies/b1672274bee4660a04596e3593464719/node_16.11.1_linux_x64_cflinuxfs3_beefe428.tgz]

Using default npm version: 8.0.0

-----> Installing yarn 1.22.17

Copy [/tmp/buildpacks/b5d6a61786998958022dd900561c3bef/dependencies/4984aeaaf5967be21b1e442d431a1957/yarn_1.22.17_linux_noarch_any-stack_08892f64.tgz]

Installed yarn 1.22.17

-----> Creating runtime environment

PRO TIP: It is recommended to vendor the application's Node.js dependencies

Visit http://docs.cloudfoundry.org/buildpacks/node/index.html#vendoring

NODE_ENV=production

NODE_HOME=/tmp/contents3826178700/deps/0/node

NODE_MODULES_CACHE=true

NODE_VERBOSE=false

NPM_CONFIG_LOGLEVEL=error

NPM_CONFIG_PRODUCTION=true

-----> Building dependencies

Installing node modules (package.json + package-lock.json)

npm notice

npm notice New minor version of npm available! 8.0.0 -> 8.3.0

npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.3.0

npm notice Run `npm install -g npm@8.3.0` to update!

npm notice

npm ERR! code ENOTFOUND

npm ERR! syscall getaddrinfo

npm ERR! errno ENOTFOUND

npm ERR! network request to http://nginx-redirector.repo-cache.svc.cluster.local/repository/appstudio-npm-group/yallist/-/yallist-4.0.0.tgz failed, reason: getaddrinfo ENOTFOUND nginx-redirector.repo-cache.svc.cluster.local

npm ERR! network This is a problem related to network connectivity.

npm ERR! network In most cases you are behind a proxy or have bad network settings.

npm ERR! network

npm ERR! network If you are behind a proxy, please make sure that the

npm ERR! network 'proxy' config is set properly. See: 'npm help config'

npm ERR! A complete log of this run can be found in:

npm ERR! /tmp/cache/final/.npm/_logs/2022-01-12T16_47_09_948Z-debug.log

**ERROR** Unable to build dependencies: exit status 1

BuildpackCompileFailed - App staging failed in the buildpack compile phase

FAILED

 


Issue #2: I am also facing issues with the MTA build process. When I run the command “mbt build -t ./”, it also fails with the below error:

user: risk-management $ mbt build -t ./

[2022-01-12 20:00:41] INFO Cloud MTA Build Tool version 1.2.7

[2022-01-12 20:00:41] INFO generating the "Makefile_20220112200041.mta" file...

[2022-01-12 20:00:41] INFO done

[2022-01-12 20:00:41] INFO executing the "make -f Makefile_20220112200041.mta p=cf mtar= strict=true mode= t=\"./\"" command...

[2022-01-12 20:00:41] INFO validating the MTA project

[2022-01-12 20:00:41] INFO running the "before-all" build...

[2022-01-12 20:00:41] INFO executing the "npm ci" command...

npm WARN prepare removing existing node_modules/ before installation

npm ERR! cipm can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.

npm ERR!

npm ERR!

npm ERR! Missing: hdb@^0.18.3

npm ERR!

 

npm ERR! A complete log of this run can be found in:

npm ERR! /home/user/.npm/_logs/2022-01-12T20_00_42_587Z-debug.log

[2022-01-12 20:00:42] ERROR the "before-all"" build failed: could not execute the "npm ci" command: exit status 1

make: *** [Makefile_20220112200041.mta:28: pre_build] Error 1

Error: could not build the MTA project: could not execute the "make -f Makefile_20220112200041.mta p=cf mtar= strict=true mode= t=\"./\"" command: exit status 2

 

Did anyone come across this issue & how did you resolve this?

Thanks.

- Dhruba

Sabarim_07
Explorer

Hi Dhruba,

For issue 1,
Step 1: 
Add the .npmrc file

add the content registry=https://registry.npmjs.com/

Step 2:

Delete the package-lock.json & node_module in your existing project with the respective files from the repository.
Then run command npm ci within the root of your project.

I also faced the same issue#1, by following these step it will be resolved.
Thanks,

Sabari Nathan

Accepted Solutions (1)

Accepted Solutions (1)

jannes_schofeld
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi @Jarmo_Tuominen and @Tiwari ,

please have a look at the following GitHub repository that we have created for the course: https://github.com/SAP-samples/extension-suite-learning-journey

The main branch contains the initial state of the project, with versions of dependencies defined in the package.json and package-lock.json, that should work. Apart from that, the repository contains solution branches for each of the exercises. So there are 2 things that you could try to get to a working state again:

Option 1:

  • Replace the package.json and package-lock.json in your existing project with the respective files from the repository.
  • Then run command npm ci within the root of your project.

Option 2:

  • Create a new folder  / workspace in your SAP Business Application Studio dev space (Open folder projects, within projects, create a new folder, e.g. risk-management-repo)
  • Switch into the new folder risk-management-repo and run command git clone https://github.com/SAP-samples/extension-suite-learning-journey
  • Now you can run command git checkout <branch> where you replace <branch> with any of the provided solution branches, e.g. solution/4_add_an_external_service
  • Run npm ci once
  • Use this as the base to go through the remaining exercises.

Please let me know if you need further assistance.

Best regards,

Jannes

Tiwari
Explorer
0 Kudos
Dear Jannes, Now I am getting different error - Manifest applied Packaging files to upload... Uploading files... 9.24 KiB / 9.24 KiB 100.00% 1s Waiting for API to complete processing files... Staging app and tracing logs... Downloading nodejs_buildpack... Downloaded nodejs_buildpack Cell 52223b68-2a95-4e12-9fe8-6703e117c737 creating container for instance 95199459-67ec-4413-acd9-80fedb17d6ab Cell 52223b68-2a95-4e12-9fe8-6703e117c737 successfully created container for instance 95199459-67ec-4413-acd9-80fedb17d6ab Downloading app package... Downloading build artifacts cache... Downloaded app package (283K) Downloaded build artifacts cache (5.6M) -----> Nodejs Buildpack version 1.7.65 -----> Installing binaries engines.node (package.json): ^12.0.0 || ^14.0.0 || ^10.0.0 engines.npm (package.json): ^6.0.0 || ^8.0.0 || ^10.0.0 || ^12.0.0 || ^14.0.0 -----> Installing node 14.18.2 Copy [/tmp/buildpacks/092478478540c0d423f0bdd91cef63b0/dependencies/44d6aeb57b09918607f5b2b4dc626375/node_14.18.2_linux_x64_cflinuxfs3_44c618d4.tgz] npm 6.14.15 already installed with node -----> Installing yarn 1.22.17 Copy [/tmp/buildpacks/092478478540c0d423f0bdd91cef63b0/dependencies/4984aeaaf5967be21b1e442d431a1957/yarn_1.22.17_linux_noarch_any-stack_08892f64.tgz] Installed yarn 1.22.17 -----> Creating runtime environment PRO TIP: It is recommended to vendor the application's Node.js dependencies Visit http://docs.cloudfoundry.org/buildpacks/node/index.html#vendoring NODE_ENV=production NODE_HOME=/tmp/contents2921570715/deps/0/node NODE_MODULES_CACHE=true NODE_VERBOSE=false NPM_CONFIG_LOGLEVEL=error NPM_CONFIG_PRODUCTION=true -----> Building dependencies Installing node modules (package.json + package-lock.json) > @Former Member/cds-compiler@2.13.8 postinstall /tmp/app/node_modules/@sap/cds-compiler > node lib/fix_antlr4-8_warning.js postinstall cds-compiler: Successfully fixed Antlr's circular dependency > @Former Member-cloud-sdk/core@1.54.0 postinstall /tmp/app/node_modules/@sap-cloud-sdk/core > node postinstall.js ============================================ 🚀 SAP Cloud SDK Announcement The SAP Cloud SDK will release new major versions regularly starting in 2022. A beta version for version 2 is expected to be released in November 2021. We will ensure that upgrading takes less than one day of effort when using our upgrade guide. Read more in our announcement post: https://sap.github.io/cloud-sdk/docs/js/announcing-version-2 Set environment variable SAP_CLOUD_SDK_SILENT to hide this and future announcements. ============================================ added 193 packages from 243 contributors and audited 362 packages in 7.779s 41 packages are looking for funding run `npm fund` for details found 5 high severity vulnerabilities run `npm audit fix` to fix them, or `npm audit` for details **WARNING** Unmet dependencies don't fail npm install but may cause runtime issues See: https://github.com/npm/npm/issues/7494 Contrast Security no credentials found. Will not write environment files. Exit status 0 Uploading droplet, build artifacts cache... Uploading droplet... Uploading build artifacts cache... Uploaded build artifacts cache (5.6M) Uploaded droplet (41.1M) Uploading complete Cell 52223b68-2a95-4e12-9fe8-6703e117c737 stopping instance 95199459-67ec-4413-acd9-80fedb17d6ab Cell 52223b68-2a95-4e12-9fe8-6703e117c737 destroying container for instance 95199459-67ec-4413-acd9-80fedb17d6ab Waiting for app risk-management-srv to start... Instances starting... Instances starting... Instances starting... Instances starting... Instances starting... Instances starting... Instances starting... Instances starting... Instances starting... Instances starting... Instances starting... Instances starting... Instances starting... Instances starting... Instances starting... name: risk-management-srv requested state: started isolation segment: trial routes: risk-management-srv-sweet-impala-gz.cfapps.us10.hana.ondemand.com last uploaded: Tue 05 Apr 01:19:10 UTC 2022 stack: cflinuxfs3 buildpacks: isolation segment: trial name version detect output buildpack name nodejs_buildpack 1.7.65 nodejs nodejs type: web sidecars: instances: 0/1 memory usage: 256M start command: npm start state since cpu memory disk details #0 crashed 2022-04-05T01:19:58Z 0.0% 14.1M of 256M 159.8M of 1G Start unsuccessful TIP: use 'cf logs risk-management-srv --recent' for more information FAILED
jannes_schofeld
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi @Tiwari,

as you can see from the message, you can use command cf logs risk-management-srv --recent to find further information about the issue. I assume this could be related to your SAP HANA Cloud trial instance. The trial version only runs for 24 hours until it gets stopped automatically. 

In your trial account, go to your Cloud Foundry dev space. There, you find the SAP HANA Cloud item in the navigational menu on the left:

Screenshot 2022-04-05 at 09.24.31.png

Open the Actions menu and select Open in SAP HANA Cloud Central:

Screenshot 2022-04-05 at 09.26.09.png

If your HANA instance shows status STOPPED, open the Actions menu and select Start to restart your database (the following screenshot shows a running instance, but the instructions apply anyways):

Screenshot 2022-04-05 at 09.27.59.png

When you have a running database, retry the deployment of your CAP application.

Best regards,

Jannes

Answers (10)

Answers (10)

martindia
Newcomer

Hi @jannes_schofeld @Tiwari @dhrubajyoti 

I solved the issue the following way - 

1. In the generated folder gen/srv there is package.json file which as dependency issues displayed when running in this error - so I run command from BAS "Fix dependency issues" which is the same as 

npm i

 2. then run 

cf push

again - it complained about module missing - so installed that 

npm i @sap/xssec

 3. After this cf push was successful

If this solves the issue - then this step is missing from the course.

 

Best,

Diana

Margit_Wagner
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi @martindia
Than you for sharing - 
@dhrubajyoti
- would you mind to check if the suggestion shared solve the issue you reported?
If this question is answered from your perspective, I also would like to ask you to use function “Accept as Solution" to complete this case.
Kind regards
Margit

jannes_schofeld
Product and Topic Expert
Product and Topic Expert

Hi @dhrubajyoti ,

can you please try to do the following?

  • remove package-lock.json file from your project

  • run command npm install in the terminal within the root directory of your project (where the package.json file resides)
  • try to do the cf push again
  • let us know the results

Thanks and best regards,

Jannes

markushaug
Product and Topic Expert
Product and Topic Expert
0 Kudos

Thanks a lot Jannes! If it still doesn't work for you, please send us your package-lock.json file. You don't have to share the whole file (it is very long), but only the part where "yallist" occurs. This could then be helpful for us.

Tiwari
Explorer
0 Kudos
I am not sure who has marked this as "answered". I tried all these steps. even checked npm config get proxy and it was null. I also tried so many options but nothing worked.
0 Kudos
Hi Jannes , I have also tried , it is not working. What is the solution for this. When everyone is facing the same error, then the issue must be at SAP End. Please suggest
Sabarim_07
Explorer
0 Kudos
Dear @jannes_schofeld, I have tried the above steps, but still the same error. Please suggest. Thanks
markushaug
Product and Topic Expert
Product and Topic Expert
Hi, we have updated the learning journey. Please follow the exercises in the updated versions. I suggest starting the learning journey again to make sure that you start from scratch.
Jarmo_Tuominen
Participant

Hi @jannes_schofeld , I am also getting the same error. I did the following:

  1. remove package-lock.json file from my project

  2. run command npm install in the terminal within the root directory of my project (where the package.json file resides)
  3. do the cf push again

Below is the log.

Applying manifest file /home/user/projects/risk-management5/manifest.yml...
Manifest applied
Packaging files to upload...
Uploading files...
8.65 KiB / 8.65 KiB 100.00% 1s

Waiting for API to complete processing files...

Staging app and tracing logs...
Downloading nodejs_buildpack...
Downloaded nodejs_buildpack
Cell bcc96d96-4385-48bb-8801-d910ed7e40f7 creating container for instance 873305ca-9eea-479d-a3a9-bfdd1d2dd6fc
Cell bcc96d96-4385-48bb-8801-d910ed7e40f7 successfully created container for instance 873305ca-9eea-479d-a3a9-bfdd1d2dd6fc
Downloading app package...
Downloaded app package (329.6K)
-----> Nodejs Buildpack version 1.7.65
-----> Installing binaries
engines.node (package.json): >=12.18
engines.npm (package.json): unspecified (use default)
**WARNING** Dangerous semver range (>) in engines.node. See: http://docs.cloudfoundry.org/buildpacks/node/node-tips.html
-----> Installing node 16.13.1
Copy [/tmp/buildpacks/092478478540c0d423f0bdd91cef63b0/dependencies/6ba42799f8211c597989b95ad2db3de2/node_16.13.1_linux_x64_cflinuxfs3_7f893010.tgz]
Using default npm version: 8.1.2
-----> Installing yarn 1.22.17
Copy [/tmp/buildpacks/092478478540c0d423f0bdd91cef63b0/dependencies/4984aeaaf5967be21b1e442d431a1957/yarn_1.22.17_linux_noarch_any-stack_08892f64.tgz]
Installed yarn 1.22.17
-----> Creating runtime environment
PRO TIP: It is recommended to vendor the application's Node.js dependencies
Visit http://docs.cloudfoundry.org/buildpacks/node/index.html#vendoring
NODE_ENV=production
NODE_HOME=/tmp/contents432129493/deps/0/node
NODE_MODULES_CACHE=true
NODE_VERBOSE=false
NPM_CONFIG_LOGLEVEL=error
NPM_CONFIG_PRODUCTION=true
-----> Building dependencies
Installing node modules (package.json + package-lock.json)
npm notice
npm notice New minor version of npm available! 8.1.2 -> 8.5.2
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v8.5.2>
npm notice Run `npm install -g npm@8.5.2` to update!
npm notice
npm ERR! code ENOTFOUND
npm ERR! syscall getaddrinfo
npm ERR! errno ENOTFOUND
npm ERR! network request to http://nginx-redirector.repo-cache.svc.cluster.local/repository/appstudio-npm-group/yallist/-/yallist-4.0.0.tgz failed, reason: getaddrinfo ENOTFOUND nginx-redirector.repo-cache.svc.cluster.local
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/cache/final/.npm/_logs/2022-02-25T13_22_36_124Z-debug.log
**ERROR** Unable to build dependencies: exit status 1
Failed to compile droplet: Failed to run all supply scripts: exit status 14
Exit status 223
Cell bcc96d96-4385-48bb-8801-d910ed7e40f7 stopping instance 873305ca-9eea-479d-a3a9-bfdd1d2dd6fc
Cell bcc96d96-4385-48bb-8801-d910ed7e40f7 destroying container for instance 873305ca-9eea-479d-a3a9-bfdd1d2dd6fc
Cell bcc96d96-4385-48bb-8801-d910ed7e40f7 successfully destroyed container for instance 873305ca-9eea-479d-a3a9-bfdd1d2dd6fc
BuildpackCompileFailed - App staging failed in the buildpack compile phase
FAILED
user: risk-management5 $

Below is the package.json file.

{

  "name""risk-management5",

  "version""1.0.0",

  "description""A simple CAP project.",

  "repository""<Add your repository here>",

  "license""UNLICENSED",

  "private"true,

  "dependencies": {

    "@sap/cds""^5",

    "express""^4",

    "hdb""^0.18.3"

  },

  "devDependencies": {

    "@sap/ux-specification""^1.96.4",

    "sqlite3""^5.0.2"

  },

  "scripts": {

    "start""cds run"

  },

  "eslintConfig": {

    "extends""eslint:recommended",

    "env": {

      "es2020"true,

      "node"true,

      "jest"true,

      "mocha"true

    },

    "globals": {

      "SELECT"true,

      "INSERT"true,

      "UPDATE"true,

      "DELETE"true,

      "CREATE"true,

      "DROP"true,

      "CDL"true,

      "CQL"true,

      "CXL"true,

      "cds"true

    },

    "rules": {

      "no-console""off",

      "require-atomic-updates""off"

    }

  },

  "sapux": [

    "app/risks"

  ],

  "cds": {

    "requires": {

      "API_BUSINESS_PARTNER": {

        "kind""odata-v2",

        "model""srv/external/API_BUSINESS_PARTNER",

        "[development]": {

          "credentials": {

            "url""https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_BUSINESS_PARTNER/"

          }

        },

        "[production]": {

          "credentials": {

            "destination""API_BUSINESS_PARTNER"

          }

        }

      },

      "db": {

        "kind""sql"

      },

      "xsuaa": {

        "kind""xsuaa"

      }

    },

    "hana": {

      "deploy-format""hdbtable"

    }

  }

}

Below is SAP Note 3124191.

3124191 - Error staging application "...": BuildpackCompileFailed - App staging failed in buildpack compile phase
Version 2 from 03.12.2021 in English


Component:CA-WDE-RUN-UI
Priority:Normal
Category:Product Enhancement
Release Status:Released to Customer
Rated Helpful:
(Article is not rated)
Quality Rating:

SAP Note/KBA Number

Symptom
Error staging application "<application_name>": BuildpackCompileFailed - App staging failed in buildpack compile phase

Environment
SAP Business Technology Platform, Cloud Foundry
Web IDE
Business Application Studio
Reproducing the Issue
Try to deploy an application in Cloud Foundry


Cause
End of maintenance of the node in question means the support of the nodejs version has been removed from the cloud foundry node buildpack which is also used by SAP BTP.

Resolution
Please check the package.json file (Raw Data) for the following sections

"engines": {
"node": "X.x"
},

All occurrences of "X.x", "^X" or similar should be replaced by

"engines": {
"node": "^Y"
},

________________________________________________________________

Example:

"engines": {

"node":"^8.0.0 || ^10.0.0"

},

As of November 25th 2021, should be replaced with:

"engines": {
"node":"^12.0.0 || ^ 14.0.0"
},
See: SAP BTP release notes & Node.js release roadmap for more information on nodejs versions

See Also
2871926 - SAP Web IDE for SAP HANA 2.0 SPS 05 - for latest nodejs support

2905298 - Problems running nodejs applications on cloud foundry using SAP Web IDE FullStack

Keywords
BuildpackCompileFailed - App staging failed in the buildpack compile phase, BAS, WebIDE, Business Application Studio, CF, Cloud Foundry, BTP, nodeJS

Product
Product or Product Version
SAP Business Technology Platform all versions
Attributes
Name
Value
Other Components CA-BAS-BLD Build Application - SAP Business Application Studio

I have tried several ways to fix the error, but not any success yet. What should be done? Thanks in advance for your help!

Jarmo_Tuominen
Participant
0 Kudos

I have decided to delete my subaccount... next I am planning to redo the exercises from scratch...

Tiwari
Explorer
0 Kudos

Hi Jarmo did you get any success? what did you do to resolve the issue?

jannes_schofeld
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi @dhrubajyoti @Jarmo_Tuominen ,

unfortunately I cannot reproduce the issue. I have adjusted the instructions, can you try to execute these adjusted instructions?

  • remove package-lock.json file from your project

  • create a file .npmrc in the directory where the package.json resides
  • add following line into the .npmrc file 
    registry=https://registry.npmjs.com/
  • run command npm install in the terminal within the root directory of your project (where the package.json file resides)
  • try to do the cf push again
  • let us know the results

I took inspiration from the following question in the community https://answers.sap.com/questions/13544661/how-to-avoid-changes-in-package-lockjson-when-usin.html , but unfortunately as said cannot reproduce the issue myself.

Thanks and best regards,

Jannes

Tiwari
Explorer
0 Kudos
deleted package-lock.json and then created file .npmrc in the same directory where package.json resides. then ran npm install and then CF PUSH.. but again same error..
Tiwari
Explorer
0 Kudos
I had even tried replacing content http://nginx-redirector.repo-cache.svc.cluster.local/repository/appstudio-npm-group/ from package-lock.json with this URL. but, still it did'nt work.
Tiwari
Explorer
0 Kudos
someone has suggested on stackoverflow - npm config set proxy http://domain:8080 but, I am not sure as how to try this 😞
Tiwari
Explorer
0 Kudos

I may be wrong but the URL ( http://nginx-redirector.repo-cache.svc.cluster.local/repository/appstudio-npm-group/) may be causing this. this may be locally accessible from SAP network but not from outside. This is just a vague thought. I tried opening this link and it says that it is not reachable. this URL is generated in package-lock.json file.

Tiwari
Explorer
0 Kudos
i also added "engines": { "node": "16.11.1", "npm": "8.0.0" } in package.json but no luck 😞
Tiwari
Explorer
0 Kudos
Sorry Jannes .. I know it would be difficult for you as you are not able to reproduce this issue. I am also trying different options to check and let you know so that something can trigger some thoughts which could be helpful for us facing this issue. Thanks
Tiwari
Explorer
0 Kudos

i tried command- "npm help config"    result --- npm ERR! code ENOENT npm ERR! syscall spawn man npm ERR! path man npm ERR! errno -2 npm ERR! enoent spawn man ENOENT npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: npm ERR! /home/user/.npm/_logs/2022-03-30T16_44_12_569Z-debug-0.log

jannes_schofeld
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi @Tiwari,

thanks for your efforts and for keeping us informed. Could you please try to run command

npm ci

instead of the npm i or npm install? npm ci is doing a clean install of all dependencies, e.g. removing all existing node modules before installing them again.

Best regards,

Jannes

Tiwari
Explorer
0 Kudos
Hi Jannes.. npm ci is throwing error if we remove package-lock.json. i ran npm install first and the ran npm ci. after that, i ran cf push but i am still getting the same error.
Tiwari
Explorer
0 Kudos
@Jannes - I tried npm help config command --- getting below error - npm help config npm ERR! code ENOENT npm ERR! syscall spawn man npm ERR! path man npm ERR! errno -2 npm ERR! enoent spawn man ENOENT npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in.. I am not sure if you can get any clue with this error. Thanks for your help!
Jarmo_Tuominen
Participant
0 Kudos

The solution to the problem below is available here: https://answers.sap.com/comments/13575789/view.html

Jarmo_Tuominen
Participant
0 Kudos

Today I again did the following:

  1. remove package-lock.json file from my project

  2. run command npm install in the terminal within the root directory of my project (where the package.json file resides)
  3. do the cf push again

Today I got once again the original error:

JarmoTuominen_0-1645966780879.png

 

Jarmo_Tuominen
Participant
0 Kudos

Today I got the log below for cf push.

user: risk-management $ cf push
Pushing apps risk-management-srv, risk-management-db-deployer to org 081025f1trial / space dev as jarmo.tuominen@accenture.com...
Applying manifest file /home/user/projects/risk-management/manifest.yml...
Manifest applied
Packaging files to upload...
Uploading files...
77.21 KiB / 77.21 KiB 100.00% 1s

Waiting for API to complete processing files...

Staging app and tracing logs...
Downloading nodejs_buildpack...
Downloaded nodejs_buildpack (182.9M)
Cell a5d98efb-e5e2-4d57-b93d-3f6287838766 creating container for instance 49fea11c-4157-436a-8111-94ded63deb9a
Cell a5d98efb-e5e2-4d57-b93d-3f6287838766 successfully created container for instance 49fea11c-4157-436a-8111-94ded63deb9a
Downloading app package...
Downloaded app package (331.1K)
-----> Nodejs Buildpack version 1.7.65
-----> Installing binaries
engines.node (package.json): >=12.18
engines.npm (package.json): unspecified (use default)
**WARNING** Dangerous semver range (>) in engines.node. See: http://docs.cloudfoundry.org/buildpacks/node/node-tips.html
-----> Installing node 16.13.1
Copy [/tmp/buildpacks/092478478540c0d423f0bdd91cef63b0/dependencies/6ba42799f8211c597989b95ad2db3de2/node_16.13.1_linux_x64_cflinuxfs3_7f893010.tgz]
Using default npm version: 8.1.2
-----> Installing yarn 1.22.17
Copy [/tmp/buildpacks/092478478540c0d423f0bdd91cef63b0/dependencies/4984aeaaf5967be21b1e442d431a1957/yarn_1.22.17_linux_noarch_any-stack_08892f64.tgz]
Installed yarn 1.22.17
-----> Creating runtime environment
PRO TIP: It is recommended to vendor the application's Node.js dependencies
Visit http://docs.cloudfoundry.org/buildpacks/node/index.html#vendoring
NODE_ENV=production
NODE_HOME=/tmp/contents1555682101/deps/0/node
NODE_MODULES_CACHE=true
NODE_VERBOSE=false
NPM_CONFIG_LOGLEVEL=error
NPM_CONFIG_PRODUCTION=true
-----> Building dependencies
Installing node modules (package.json + package-lock.json)
BuildpackCompileFailed - App staging failed in the buildpack compile phase
FAILED
user: risk-management $

When I in browser go to https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_BUSINESS_PARTNER/ , I get the error below.

{"code":"SERVICE_UNAVAILABLE","message":"From Friday, Feb 25th 14:00 CET until Thursday, Mar 3rd 10:00 CET there is a planned downtime for the API sandbox system. During this period you cannot use the Try it Out feature on our API sandbox system to test an API service."}

 

degouda
Explorer
0 Kudos

what is mean by "leaf": false? what this "leaf" represents in the below code. Code is taken from JSON file from GB(Guided buying) landing page. Please help.

{
"uniqueName": "86a43d15-feb8-492b-832a-50e502c5504b",
"title": "RFQ form",
"description": "Submit your RFQ here",
"commodityCode": "1410",
"purchasingUnit": "EuropeUnit",
"currency": "USD",
"language": "en",
"type": "Form",
"imageUrl": "/gb/tenant/Support-GB/image/assets/images/footer_SAP_Ariba_pos_blugld.png",
"targetUrl": "/form.html#editing/john/86a43d15-feb8-492b-832a-50e502c5504b",
"serviceType": "good",
"tenantId": "Support-GB",
"isDelete": false,
"leaf": false,
"dateFieldMappingPresent": false,
"quantityFieldMappingPresent": false,
"priceFieldMappingPresent": false,
"allowSubcategory": true
}

Margit_Wagner
Product and Topic Expert
Product and Topic Expert

Hi @degouda
We have received your request and are in the process of evaluating the problem.
Please allow for a delay in our response.
Kind regards
Margit
 

Margit_Wagner
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi @degouda
The SAP BTP Learning group helps you to develop the knowledge and skills you need to become an expert for SAP Business Technology Platform (BTP). Here you can ask questions and collaborate with other learners to reach your learning goals and to prepare for your SAP Certification exams, and while the topic you addressed isn't specifically covered here and since it can hardly be answered without in-depth  knowledge, I can point you to several excellent resources to help find an answer to your question. or to post your question to a our SAP Community https://sap.com/community.html where you can directly exchange with experienced experts with project Background - SAP Community is a public space where anyone can start discussions and questions are answered by anyone.
SAP Community enables professionals across the globe to connect, exchange information, engage, and receive recognition for your achievements. This inclusive and receptive environment welcomes all individuals who want to seek help and share knowledge about SAP software and solutions.

Please always feel free to come back to our SAP BTP Learning group to ask your questions and collaborate with other learners to reach your learning goals and to prepare for your SAP Certification exams. However, for your particular question, I'd recommend the resources above.
I hope this helps, and best of luck!
Margit

markushaug
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi, we have updated the learning journey which is now available at https://learning.sap.com/learning-journey/building-side-by-side-extensions-on-sap-btp.

This update also reflects the changes made in the major release 6 of the SAP Cloud Application Programming Model.

0 Kudos

I am still getting the error

Couldn't find a CDS model for '*' in /home/user/projects/risk-management

markushaug
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi, could you please share more details about the error? A log would be great.