[GH-ISSUE #18] How to setup for development - Windows #7

Closed
opened 2026-02-23 17:17:29 -05:00 by yindo · 7 comments
Owner

Originally created by @timothycarambat on GitHub (May 10, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anythingllm-docs/issues/18

From https://github.com/Mintplex-Labs/anything-llm/issues/1346

Description
In case anyone is developing on Windows, this is what I had to do...

yarn setup will not work all the way on windows because yarn setup:envs part fails due to the cp command not existing... but, you can still run yarn setup and then manually copy:

copy ./frontend/.env.example ./frontend/.env
copy ./server/.env.example ./server/.env.development
copy ./collector/.env.example ./collector/.env
copy ./docker/.env.example ./docker/.env
But then you have to run yarn prisma:setup manually, because that part was not reached in yarn setup call, after the failure of yarn setup:envs...

Finally, the NODE_ENV issue.

In all 3 package.json files inside server, client and collector folders I had to change NODE_ENV=development into set NODE_ENV=development &&.

Then in the frontend folder, nothing else was needed.

But, in both server/index.js and collector/index.js files, I added this line on top: process.env.NODE_ENV = process.env.NODE_ENV.trim();. This is because the set change sets the extra space, sadly. Alternatively, setenv may be a solution but I figured adding a single line is less disruptive than adding a whole package...

I was then able to start all three with:
yarn dev:server
yarn dev:frontend
yarn dev:collector

Naturally, these changes must not be pushed in your merge requests...

Originally created by @timothycarambat on GitHub (May 10, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anythingllm-docs/issues/18 > From https://github.com/Mintplex-Labs/anything-llm/issues/1346 Description In case anyone is developing on Windows, this is what I had to do... yarn setup will not work all the way on windows because yarn setup:envs part fails due to the cp command not existing... but, you can still run yarn setup and then manually copy: copy ./frontend/.env.example ./frontend/.env copy ./server/.env.example ./server/.env.development copy ./collector/.env.example ./collector/.env copy ./docker/.env.example ./docker/.env But then you have to run yarn prisma:setup manually, because that part was not reached in yarn setup call, after the failure of yarn setup:envs... Finally, the NODE_ENV issue. In all 3 package.json files inside server, client and collector folders I had to change NODE_ENV=development into set NODE_ENV=development &&. Then in the frontend folder, nothing else was needed. But, in both server/index.js and collector/index.js files, I added this line on top: process.env.NODE_ENV = process.env.NODE_ENV.trim();. This is because the set change sets the extra space, sadly. Alternatively, [setenv](https://www.npmjs.com/package/setenv) may be a solution but I figured adding a single line is less disruptive than adding a whole package... I was then able to start all three with: yarn dev:server yarn dev:frontend yarn dev:collector Naturally, these changes must not be pushed in your merge requests...
yindo closed this issue 2026-02-23 17:17:29 -05:00
Author
Owner

@ShadowArcanist commented on GitHub (May 11, 2024):

@timothycarambat can I just create a new page on docs and copy paste your message (you sent above)? or is there anything else we have to add to your message ?

@ShadowArcanist commented on GitHub (May 11, 2024): @timothycarambat can I just create a new page on docs and copy paste your message (you sent above)? or is there anything else we have to add to your message ?
Author
Owner

@timothycarambat commented on GitHub (May 11, 2024):

There is really nothing new. The only detail is this is for local development and you should not run the app this way for production instances

@timothycarambat commented on GitHub (May 11, 2024): There is really nothing new. The only detail is this is for local development and you should **not** run the app this way for production instances
Author
Owner

@yongshengma commented on GitHub (Nov 21, 2024):

cp command works in my Windows VS Code, so this part is not necessary:

yarn setup will not work all the way on windows because yarn setup:envs part fails due to the cp command not existing... but, you can still run yarn setup and then manually copy:

copy ./frontend/.env.example ./frontend/.env
copy ./server/.env.example ./server/.env.development
copy ./collector/.env.example ./collector/.env
copy ./docker/.env.example ./docker/.env
But then you have to run yarn prisma:setup manually, because that part was not reached in yarn setup call, after the failure of yarn setup:envs...

@yongshengma commented on GitHub (Nov 21, 2024): cp command works in my Windows VS Code, so this part is not necessary: > yarn setup will not work all the way on windows because yarn setup:envs part fails due to the cp command not existing... but, you can still run yarn setup and then manually copy: > > copy ./frontend/.env.example ./frontend/.env > copy ./server/.env.example ./server/.env.development > copy ./collector/.env.example ./collector/.env > copy ./docker/.env.example ./docker/.env > But then you have to run yarn prisma:setup manually, because that part was not reached in yarn setup call, after the failure of yarn setup:envs...
Author
Owner

@timothycarambat commented on GitHub (Nov 22, 2024):

Are you in WSL or are using some other Linux emulation shell cp is not a valid Powershell command

@timothycarambat commented on GitHub (Nov 22, 2024): Are you in WSL or are using some other Linux emulation shell `cp` is not a valid Powershell command
Author
Owner

@yongshengma commented on GitHub (Nov 26, 2024):

Yeath, it looks like WSL installed. I tried to install a unix-like env on Windows long long ago but failed finally.

1732613643486

1732613683140

@yongshengma commented on GitHub (Nov 26, 2024): Yeath, it looks like WSL installed. I tried to install a unix-like env on Windows long long ago but failed finally. ![1732613643486](https://github.com/user-attachments/assets/ed1b623f-069f-4ef0-afc1-d9ec49ad2bcd) ![1732613683140](https://github.com/user-attachments/assets/9bf9780f-9fb6-4adc-b104-b7b75865888f)
Author
Owner

@timothycarambat commented on GitHub (Nov 26, 2024):

There is no .env.example in the root of the directory. In WSL you can just use the Linux setup, so all you need is

  • NodeJS 18.13.0
  • yarn

Then

git clone git@github.com:Mintplex-Labs/anything-llm.git
cd anything-llm
yarn setup
yarn prisma:migrate && yarn prisma:generate

Now everything is set up and installed. You can edit server/.env.development with your settings and keys and to start the development you can run each of these commands in separate windows from the project root:
yarn dev:server - starts backend
yarn dev:frontend - starts frontend
yarn dev:collector - stars documents collector

I am not sure what you are doing in the above screenshots since it looks like you didn't even git clone the repo since the folder is totally empty

@timothycarambat commented on GitHub (Nov 26, 2024): There is no `.env.example` in the root of the directory. In WSL you can just use the Linux setup, so all you need is - NodeJS 18.13.0 - yarn Then ``` git clone git@github.com:Mintplex-Labs/anything-llm.git cd anything-llm yarn setup yarn prisma:migrate && yarn prisma:generate ``` Now everything is set up and installed. You can edit `server/.env.development` with your settings and keys and to start the development you can run each of these commands in separate windows from the project root: `yarn dev:server` - starts backend `yarn dev:frontend` - starts frontend `yarn dev:collector` - stars documents collector I am not sure what you are doing in the above screenshots since it looks like you didn't even git clone the repo since the folder is totally empty
Author
Owner

@yongshengma commented on GitHub (Nov 27, 2024):

I am not sure what you are doing in the above screenshots since it looks like you didn't even git clone the repo since the folder is totally empty

Thanks for summary! The above is just to show linux-like command works in my powershell. Except that the operations are totally garbage ......

@yongshengma commented on GitHub (Nov 27, 2024): > I am not sure what you are doing in the above screenshots since it looks like you didn't even git clone the repo since the folder is totally empty Thanks for summary! The above is just to show linux-like command works in my powershell. Except that the operations are totally garbage ......
yindo changed title from How to setup for development - Windows to [GH-ISSUE #18] How to setup for development - Windows 2026-06-05 15:21:49 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anythingllm-docs#7