Hi,
I’m using the Gitlab pipe to build a node server. It all worked fine but with the latest code changes its not working anymore. Locally running the same commands as in the gitlab-ci.yml all works perfectly.
Gitlab Error:
> backend@1.0.0 tsc
> tsc
models/Agenda/agenda.validator.ts(127,77): error TS2694: Namespace '"*"' has no exported member 'ValidateFunction'.
models/Agenda/agenda.validator.ts
export type ValidateFunction<T> = ((data: unknown) => data is T) & Pick<Ajv.ValidateFunction, 'errors'>
export const isIAgenda = ajv.compile(IAgendaSchema) as ValidateFunction<IAgenda>;
export default function validate(value: unknown): IAgenda {
if (isIAgenda(value)) {
return value;
} else {
throw new Error(
ajv.errorsText(isIAgenda.errors!.filter((e: any) => e.keyword !== 'if'), {dataVar: 'IAgenda'}) +
'\n\n' +
inspect(value),
);
}
}
The file was generated by this tool .
gitlab-ci.yml
build:
stage: build
script:
- (cd backend && npm ci --cache .npm --prefer-offline && npm run tsc)
- mkdir -p dist
- cp -r backend dist/backend
- cp web/cms.zip dist/cms.zip
artifacts:
paths:
- dist
- web/app
Using gitlab.com