fix(api): fix build issues

This commit is contained in:
isra el
2025-12-14 15:01:26 +03:00
parent ca0ac8cf6e
commit 86060456fa
2 changed files with 7 additions and 1 deletions

View File

@@ -11,7 +11,7 @@
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"start:dev": "nest start --watch",
"start:debug": "nest start --debug --watch",
"start": "node dist/src/main",
"start": "node dist/main.js",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"test": "jest",
"test:watch": "jest --watch",

View File

@@ -1,4 +1,5 @@
import 'dotenv/config'
import * as crypto from 'crypto'
import { VersioningType, Logger } from '@nestjs/common'
import { NestFactory } from '@nestjs/core'
import { AppModule } from './app.module'
@@ -7,6 +8,11 @@ import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger'
import * as express from 'express'
import { NestExpressApplication } from '@nestjs/platform-express'
// Ensure crypto is available globally for @nestjs/schedule
if (typeof globalThis.crypto === 'undefined') {
globalThis.crypto = crypto as any
}
// Global error handlers to prevent server crashes
const logger = new Logger('GlobalErrorHandler')