Closed Basti126 closed 4 years ago
Hi @Basti126,
would it be possible to provide a minimal example for reproducing the issue? This would make it easier and faster for us to look into the issue. Of course leaving out any confidential parts, only what is needed to reproduce the behavior you see.
Hello @fwilhe,
quiete simple example. We used scafffolding
sap-cloud-sdk init my-sdk-project
to create a NodeJs Application. This generates per default a manifest.yml. As we're want to use cloud TMS for transport we need to switch to a mta.yml.
In manifest.yml is a command npm run start:prod
specified as command
Manifest.yml
Package.json
package.json list as "start": "nest start".
With mta.yml is seems that start is triggerd, but nest is not found. So we switched to “node dist/main“ for "start" as manifest is calling this for prod.
As result the app is not starting because the dist folder is not found.
Does that error also occur when you're doing a cf deployment from the CLI on your local machine?
What is the content of your mta file?
You could also try to extract the content of the mtar archive and check whether the package.json as well as the dist folder is included.
To have a similar behavior as in the pipeline it might make sense to run the scripts npm install
, npm run ci-build
and npm run ci-package
in the before all section and let the path in the mta module point the the deployment
folder as in the manifest.yml
.
Thanks for your help, the -npm install, - npm run ci-build and - npm run ci-package in the before section solved the problem.
Good morning, We want to move from a SDK Node.js manifest deployment to the mta deployment. After creating the mta.ymal, the application crashed always (while CF deployment) with the message that the nest can’t be found. We saw that the Manifest.yml uses “command: npm run start:prod” refered to the Package.jason. The mta deploymend seems to use the “start”: (instead the “start:prod”: from the manifest.yml), so we give it a try and changed the “start”: to the same value then the “start:prod” (node dist/main). Result is that the folder “dist” I not available at runtime. If we run the CF deployment in the same configuration without the pipeline directly, the folder is available and the application starts up. So is there maybe a problem with the pipeline or is it the wrong way we take for the SDK Node.js mta deployment? Thanks for your help! Regards Sebastian