Fix build for node 20

This commit is contained in:
Caramel 2023-06-15 13:24:34 +02:00
parent b8db72bac4
commit e2de37a6dd
No known key found for this signature in database
6 changed files with 18 additions and 10 deletions

View File

@ -10,11 +10,10 @@
"scripts": {
"prebuild": "rimraf dist",
"build": "nest build",
"start": "nest start --exec \"node --es-module-specifier-resolution=node\"",
"start:devnew": "yarn clean && nest start --watch",
"start:dev": "yarn clean && nest start --watch --exec \"node --es-module-specifier-resolution=node\"",
"start:debug": "nest start --debug --watch --exec \"node --es-module-specifier-resolution=node\"",
"start:prod": "node --es-module-specifier-resolution=node dist/main",
"start": "nest start --exec \"node --experimental-loader=extensionless\"",
"start:dev": "yarn clean && nest start --watch --exec \"node --experimental-loader=extensionless\"",
"start:debug": "nest start --debug --watch --exec \"node --experimental-loader=extensionless\"",
"start:prod": "node --experimental-loader=extensionless dist/main",
"typeorm": "typeorm-ts-node-esm",
"migrate": "PICSUR_PRODUCTION=\"true\" yarn typeorm migration:generate -d ./src/datasource.ts",
"format": "prettier --write \"src/**/*.ts\"",
@ -39,6 +38,7 @@
"bcrypt": "^5.1.0",
"bmp-img": "^1.2.1",
"cors": "^2.8.5",
"extensionless": "^1.4.5",
"file-type": "^18.5.0",
"is-docker": "^3.0.0",
"ms": "3.0.0-canary.1",

View File

@ -23,7 +23,7 @@ import {
@Catch()
export class MainExceptionFilter implements ExceptionFilter {
private static readonly logger = new Logger(MainExceptionFilter.name);
private static readonly logger = new Logger('MainExceptionFilter');
catch(exception: Failure, host: ArgumentsHost) {
const ctx = host.switchToHttp();

View File

@ -9,7 +9,7 @@
"scripts": {
"ng": "ng",
"start": "ng serve --host 0.0.0.0",
"build": "ng build --verbose",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"purge": "rm -rf dist && rm -rf node_modules && rm -rf .angular"
},

View File

@ -1,6 +1,6 @@
# This dockerfile only builds the javascript part of the project, so tsc and angular compilation
FROM node:18 AS BUILDER_STAGE1
FROM node:20 AS BUILDER_STAGE1
SHELL ["/bin/bash", "-c"]

View File

@ -3,7 +3,7 @@
# Always fetch amd64 image
FROM ghcr.io/caramelfur/picsur-alpha-stage1:latest AS BUILDER_STAGE1
FROM node:18-alpine AS BUILDER_STAGE2
FROM node:20-alpine AS BUILDER_STAGE2
RUN apk add python3 build-base
@ -12,7 +12,7 @@ COPY --from=BUILDER_STAGE1 /picsur ./
RUN yarn workspaces focus -A --production
FROM node:18-alpine
FROM node:20-alpine
ENV PICSUR_PRODUCTION=true

View File

@ -7836,6 +7836,13 @@ __metadata:
languageName: node
linkType: hard
"extensionless@npm:^1.4.5":
version: 1.4.5
resolution: "extensionless@npm:1.4.5"
checksum: bc36e2e1493378ca04131a5ba9089bf5d3f0809ed97e9c780625a006ded15b3e5e91f03ee5264683520e6cd3f97de2c1058dffec5be7e98c51ad8997828c68d0
languageName: node
linkType: hard
"external-editor@npm:^3.0.3":
version: 3.1.0
resolution: "external-editor@npm:3.1.0"
@ -11172,6 +11179,7 @@ __metadata:
bcrypt: ^5.1.0
bmp-img: ^1.2.1
cors: ^2.8.5
extensionless: ^1.4.5
file-type: ^18.5.0
is-docker: ^3.0.0
ms: 3.0.0-canary.1