jowavp/sap-cf-proxy

First time user: MTA build fails

piejanssens opened this issue · 2 comments

First had to npm -g i npm-run-all, that was a quick fix, I have no clue how to continue here:

❯ npm run build:mta

> sap-cf-proxy@0.0.1 build:mta
> mbt build

[2021-11-30 14:55:18]  INFO Cloud MTA Build Tool version 1.2.7
[2021-11-30 14:55:18]  INFO generating the "Makefile_20211130145518.mta" file...
[2021-11-30 14:55:18]  INFO done
[2021-11-30 14:55:18]  INFO executing the "make -f Makefile_20211130145518.mta p=cf mtar= strict=true mode=" command...
[2021-11-30 14:55:18]  INFO validating the MTA project
[2021-11-30 14:55:18]  INFO running the "before-all" build...
[2021-11-30 14:55:18]  INFO executing the "npm install --production" command...
.
up to date, audited 178 packages in 1s

34 packages are looking for funding
  run `npm fund` for details

2 vulnerabilities (1 moderate, 1 high)

To address all issues, run:
  npm audit fix

Run `npm audit` for details.
[2021-11-30 14:55:19]  INFO executing the "npm run build" command...

> sap-cf-proxy@0.0.1 build
> run-s build:tsc build:sshenabler


> sap-cf-proxy@0.0.1 build:tsc
> tsc

.ts/proxy/authentication.ts(1,24): error TS7016: Could not find a declaration file for module '@sap/xsenv'. '/home/pieter/projects/sap-cf-proxy/node_modules/@sap/xsenv/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/sap__xsenv` if it exists or add a new declaration (.d.ts) file containing `declare module '@sap/xsenv';`
ts/proxy/index.ts(2,23): error TS7016: Could not find a declaration file for module 'http-proxy'. '/home/pieter/projects/sap-cf-proxy/node_modules/http-proxy/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/http-proxy` if it exists or add a new declaration (.d.ts) file containing `declare module 'http-proxy';`
ts/proxy/index.ts(3,18): error TS7016: Could not find a declaration file for module 'pino'. '/home/pieter/projects/sap-cf-proxy/node_modules/pino/pino.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/pino` if it exists or add a new declaration (.d.ts) file containing `declare module 'pino';`
ts/proxy/index.ts(6,24): error TS7016: Could not find a declaration file for module '@sap/xsenv'. '/home/pieter/projects/sap-cf-proxy/node_modules/@sap/xsenv/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/sap__xsenv` if it exists or add a new declaration (.d.ts) file containing `declare module '@sap/xsenv';`
ts/proxy/index.ts(60,32): error TS7006: Parameter 'proxyReq' implicitly has an 'any' type.
ts/proxy/index.ts(60,42): error TS7006: Parameter 'req' implicitly has an 'any' type.
ts/proxy/index.ts(60,47): error TS7006: Parameter 'res' implicitly has an 'any' type.
ts/proxy/index.ts(60,52): error TS7006: Parameter 'options' implicitly has an 'any' type.
ERROR: "build:tsc" exited with 2.
[2021-11-30 14:55:21] ERROR the "before-all"" build failed: could not execute the "npm run build" command: exit status 1
make: *** [Makefile_20211130145518.mta:28: pre_build] Error 1
Error: could not build the MTA project: could not execute the "make -f Makefile_20211130145518.mta p=cf mtar= strict=true mode=" command: exit status 2

I can build after commenting out '--production' in the before-all section of mta.yaml.