Open workphone-002 opened 6 months ago
Hi! You are having the same issues as I do, see here. Disclamer, I have have minimal experience with all of this, especially the combination of node, django/python etc.
Error 2: This was fixed for me by manually install nvm, node, npm, yarn (globall), and in the Frontend folder install next, react, react-dom via npm and then add unmet peer dependencies in package.json (see below).
Error 3: I don't think your frontend is running since you cant visit the page... I had it running at some point but forgot how and now in more mess it seems.
Error 4: I hardcoded the credentials from .env into Backend/services/settings.py. I install and run postgres database locally (and make a database, user and password) My DATABASES section in settings.py (some parts redacted...duh). The important thing seems to be the ENGINE definition which cannot be 'postgres' it seems but is another package.
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql_psycopg2",
"NAME": "postgres",
"USER": "postgres",
"PASSWORD": "redacted",
"HOST": "localhost",
"PORT": "5432"
}
}
My package.json:
{
"name": "translation-app-frontend",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@chakra-ui/next-js": "^2.1.5",
"@chakra-ui/react": "2.8.2",
"@emotion/react": "^11",
"@emotion/styled": "^11.0.0",
"@types/node": "20.5.0",
"@types/react": "18.2.20",
"@types/react-dom": "18.2.7",
"autoprefixer": "10.4.15",
"bcrypt": "^5.1.1",
"bcryptjs": "^2.4.3",
"eslint": "8.47.0",
"eslint-config-next": "13.4.13",
"framer-motion": "4.0.0",
"js-cookie": "^3.0.5",
"next": "^13.5.6",
"postcss": "8.4.27",
"prop-types": "^15.6.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-dropzone": "^14.2.3",
"react-hook-form": "^7.45.4",
"react-infinite-scroll-component": "^6.1.0",
"react-loading": "^2.0.3",
"react-pdf": "^7.3.3",
"react-toastify": "^9.1.3",
"tailwindcss": "3.3.3",
"typescript": "5.1.6"
}
}
It is the first time that I use docker and honestly, I have no idea how it works, I have limited myself to following the installation instructions that you indicate but I cannot in any way get the app to work. In the installation instructions, step 3 states Important: Then, put the necessary environment files (.env) in this folder. Since I don't really know what to do in this step, I have limited myself to renaming the .env-template file to .env:
I am using a Windows 11 machine and Docker-desktop configured on wsl2
The first error I got was during the process
[backend 6/7] RUN pip install -r requirements.txt
:9.809 ERROR: Package 'networkx' requires a different Python: 3.8.10 not in '>=3.9'
This bug was fixed by adding 'networkx==3.1' in the requirements.txt fileThe second error I ran into took place in
[+] Running 4/3
As I said at the beginning, I have no idea about docker (or next), but by consulting some related problems I was able to solve it (or so I think) by modifying the volume configuration in the services docker-compose.yml. I'm not sure if this is correct but it apparently solved the problem:
The third error also occurs in
[+] Running 4/3
:I guess this is why when I access http://localhost:3000/ the page doesn't load, but although I have searched for information and it seems that using host.docker.internal instead of localhost:xxxx could be a solution as suggested in this related issue ([](https://stackoverflow.com/questions/55851632/docker-compose-network-mode -host-not-working)), I don't know where to make the modifications and therefore I haven't been able to solve it:![image](https://github.com/phkhanhtrinh23/translation_layoutrecovery/assets/157492686/dd4b710d-af5b-4641-83c8-556a662a2323)
Finally, in addition to the previous error that I don't know how to solve, an error message always appears in [+] Running 4/3 after
Successfully installed translation-app
. I also don't know how to fix this error: