Closed sfdfklskldf closed 1 month ago
Hi @sfdfklskldf ,
This looks correct to me. Our docs regarding this issue also mention the same solution. If it's an issue during deployment, it might be related to your mta config. I would suggest to reach out to CAP.
But how could MTA-build introduce an issue here? Could it be that the error is triggered because of some packange configuration is missing? I am not yet sure if my code itself would work already correct. But the error says it could not find the complete module. I already tested to avoid sending node_modules inside the MTA package to force installation in the cloud but does not work:
modules:
- name: myapp-srv
type: nodejs
path: gen/srv
parameters:
buildpack: nodejs_buildpack
build-parameters:
builder: npm
ignore: ["node_modules/"]
If I run a SAP CAP app locally with "cds watch" there is no issue with the package "@sap-cloud-sdk/http-client" if I try to deploy it as mta build I get ''ERR Error: Cannot find module @sap-cloud-sdk/http-client''
It is mentioned in package.json like this
It is used in a .js-file that is placed under a "lib" folder like this:
Compare: https://developers.sap.com/tutorials/cap-soap-service..html Step 8)
What could be the issue that the package could not be found on CF? I am sure it must be a small problem but I can't find it :-/