Skip to content

Commit

Permalink
🐛 Fix error white building app
Browse files Browse the repository at this point in the history
  • Loading branch information
Nachwahl committed Jun 21, 2024
1 parent 81d5f43 commit b577207
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3,736 deletions.
2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node --inspect index.js",
"start": "node index.js",
"start-nodemon": "nodemon index.js",
"start:migrate": "npx prisma migrate deploy && node index.js",
"build": "tsc"
Expand Down
8 changes: 5 additions & 3 deletions backend/src/controllers/RegionsController.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/******************************************************************************
* RegionsController.ts *
* *
* Copyright (c) 2022-2023 Robin Ferch *
* Copyright (c) 2022-2024 Robin Ferch *
* https://robinferch.me *
* This project is released under the MIT license. *
******************************************************************************/
Expand All @@ -10,7 +10,7 @@ import { Request, Response } from "express";
import Core from "../Core.js";
import axios from "axios";
import { validationResult } from "express-validator";
import imageminWebp from "imagemin-webp";
import imageminWebp from 'imagemin-webp';
import imagemin from "imagemin";

class RegionsController {
Expand Down Expand Up @@ -328,7 +328,8 @@ class RegionsController {
// @ts-ignore
const webp = await imagemin.buffer(request.files.image.data, {
plugins: [
imageminWebp({ quality: 50 })
// @ts-ignore
imageminWebp({quality: 50})
]
})
const image = await this.core.getPrisma().image.create({
Expand Down Expand Up @@ -363,6 +364,7 @@ class RegionsController {
for (const imageKey in request.files.image) {
const webp = await imagemin.buffer(request.files.image[imageKey].data, {
plugins: [
// @ts-ignore
imageminWebp({ quality: 50 })
]
})
Expand Down
6 changes: 5 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
"preview": "vite preview"
},
"dependencies": {
"@bte-germany/terraconvert": "^1.1.2",
"@elastic/react-search-ui": "^1.18.3",
"@emotion/react": "^11.10.5",
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
"@mantine/carousel": "^5.10.1",
"@mantine/core": "^5.10.1",
"@mantine/dates": "^5.10.1",
Expand All @@ -21,6 +23,7 @@
"@mantine/rte": "^5.10.1",
"@mantine/spotlight": "^5.10.1",
"@react-keycloak-fork/web": "^4.0.3",
"@tabler/icons-react": "^2.45.0",
"@turf/turf": "^6.5.0",
"axios": "^1.2.2",
"dayjs": "^1.11.7",
Expand All @@ -47,5 +50,6 @@
"@vitejs/plugin-react": "^3.0.1",
"dotenv": "^16.3.1",
"vite": "^4.0.4"
}
},
"packageManager": "[email protected]"
}
Loading

0 comments on commit b577207

Please sign in to comment.