Native development on Windows 10 #16428
dearliuliu0522
started this conversation in
Community Guides
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want secondary development according to my needs, so being deployed with docker is not enough. Here is my way to configure developing environment on Windows:
Shut down all containers if they are runing. Then open docker-compose.yml, add ports mapping on redis and database sections as below, otherwise you can't connect to redis and database when server starts and can't be accessed through Navicat and redis manager.
if all go right, you'll see containers' ports mapping as below:

Then excute "docker compose up -d" to update and restart all containers except immich-server container. Now you can test if redis and database could be accessed by Navicat and redis manager. Make sure they could be.
build open-api
At "open-api/typescript-sdk" directory, run "npm i --save @immich/sdk" and then "npm run build". Now @immich/sdk is available on immich server.
Start immich server

Before operating as below, you should make sure Visual Studio is instsalled on your computer, otherwise it will remind you to install VS and it will failed.
At "server" directory, edit "src/repositories/config.repository.ts":
Next, run "npm install" and "npm start" to start immich server. You may encounter warn like "Failed to read /build/build-lock.json", just download below file to a directory(to me, it's D:\build):
https://github.com/immich-app/base-images/blob/main/server/bin/build-lock.json
then download these file to a sub directory(to me, it's D:\build\geodata:

download link: https://aur.archlinux.org/packages/immich-server?O=100
At "web" directory, run "npm i -D @sveltejs/adapter-node" to install SvelteKit. Next, run "npm install" and "npm run dev" to start web app. Note you should make sure "process.env.IMMICH_SERVER_URL" is valid at "vite.config.js" file:
You may encounter error like "flutter_service_worker.js". Here is the solution:
flutter/flutter#151719 (comment)
Edit "mobile/android/gradle.properties", and add "kotlin.incremental=false" at the last line of the file. Select real phone or simulator, then start the app at run or debug mode.
At inputing endpoint step, you may encounter error like "not able to connect to server". Log as below:
· Missing authentication, server or endpoint from the local store
· Unable to login using offline or online methods - Logging out completely
· Logout failed
I tried many other methods, but can't find the real reason. My temporary solution is using mobile phone's wifi hotspot rather than wifi.
I'm not familar with web and mobile app, so all these steps cost me a day.
Beta Was this translation helpful? Give feedback.
All reactions