Skip to content

Commit

Permalink
Fix build for node 20
Browse files Browse the repository at this point in the history
  • Loading branch information
CaramelFur committed Jun 15, 2023
1 parent b8db72b commit e2de37a
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 10 deletions.
10 changes: 5 additions & 5 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\"",
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion backend/src/layers/exception/exception.filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion support/picsur-stage1.Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]

Expand Down
4 changes: 2 additions & 2 deletions support/picsur-stage2.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down
8 changes: 8 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e2de37a

Please sign in to comment.