[GH-ISSUE #1346] [DOCS]: How to setup for development - Windows #852

Closed
opened 2026-02-22 18:21:47 -05:00 by yindo · 1 comment
Owner

Originally created by @cope on GitHub (May 10, 2024).
Original GitHub issue: 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 @cope on GitHub (May 10, 2024). Original GitHub issue: 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 added the documentation label 2026-02-22 18:21:47 -05:00
yindo closed this issue 2026-02-22 18:21:47 -05:00
Author
Owner

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

This is useful for sure for those who want to do local dev on windows. Let's move this request to our docs repo. Makes sense to turn this issue into just a page on the docs site for future posterity instead of just another floating MD file in the repo
https://github.com/Mintplex-Labs/anythingllm-docs/issues/18

@timothycarambat commented on GitHub (May 10, 2024): This is useful for sure for those who want to do local dev on windows. Let's move this request to our docs repo. Makes sense to turn this issue into just a page on the docs site for future posterity instead of just another floating MD file in the repo https://github.com/Mintplex-Labs/anythingllm-docs/issues/18
yindo changed title from [DOCS]: How to setup for development - Windows to [GH-ISSUE #1346] [DOCS]: How to setup for development - Windows 2026-06-05 14:37:33 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#852