inbox
inbox copied to clipboard
Update repo docs to add instructions for windows WSL mode
Local dev dosnt work directly on a windows machine Windows users should instead set up and use WSL @McPizza0 created a lengthy guide to set thing up as a video: https://www.youtube.com/watch?v=xL-nwGpQ0Ng we need to summarize this into steps and potentially add it to a linked doc from the main readme
Original issue:
I ran into this while tryna set-up my local dev server on my windows machine.
Windows users encounter errors running scripts due to differences in command syntax. I think the scripts across all apps have been written in a ways that isn't exactly cross-compactible, the current script look like they run only on Unix-based systems
(I think π¬).
Steps to Reproduce:
- Clone the repository on a Windows machine.
- Run
pnpm run dev
Expected Behavior:
Scripts should run without errors on Windows.
Actual Behavior:
Windows throws an error because it does not recognize the syntax PORT
. Notice the specific error in the log below...
> [email protected] dev C:\Users\User\Documents\Projects\open-source\uninbox
> dotenv -e .env.local -- turbo run dev --filter=!@uninbox/landing
// [minimised]
@uninbox/web-app:dev:
@uninbox/web-app:dev: > @uninbox/web-app@ dev C:\Users\User\Documents\Projects\open-source\uninbox\apps\web-app
@uninbox/web-app:dev: > PORT=3000 nuxt dev --host
@uninbox/web-app:dev:
@uninbox/web-app:dev: 'PORT' is not recognized as an internal or external command, // <---- π π π π π π
@uninbox/web-app:dev: operable program or batch file.
@uninbox/web-app:dev: βELIFECYCLEβ Command failed with exit code 1.
@uninbox/postal-puppet:build:puppet:
@uninbox/postal-puppet:build:puppet: > @uninbox/[email protected] build:puppet C:\Users\User\Documents\Projects\open-source\uninbox\packages\postal-puppet
@uninbox/postal-puppet:build:puppet: > unbuild
@uninbox/postal-puppet:build:puppet:
@uninbox/storage:dev:
@uninbox/storage:dev: > @uninbox/storage@ dev C:\Users\User\Documents\Projects\open-source\uninbox\apps\storage
@uninbox/storage:dev: > PORT=3200 npx nitropack dev
@uninbox/storage:dev:
@uninbox/storage:dev: 'PORT' is not recognized as an internal or external command, // <---- π π π π π π
@uninbox/storage:dev: operable program or batch file.
@uninbox/storage:dev: βELIFECYCLEβ Command failed with exit code 1.
// [minimised]
Workaround:
Modify the dev
scripts in all apps
package.json using the format below in places where PORT
are set
"dev": "set PORT=3*** && <command>"
Replace 3***
with appropriately stated port and replace <command>
with the already existing command
Proposed Solution:
Update all scripts in the repository to use cross-platform compatible syntax.
Additional Notes:
- This issue affects Windows users and should be resolved for better cross-platform compatibility.
you need to set up and run things in WSL when using windows I thought we updated the readme to add something but it seems we didnt I created a video on setting up WSL here: https://www.youtube.com/watch?v=xL-nwGpQ0Ng
will leave this issue open to update the docs have also edited your original issue to highlight the change
I have this set-up, already to allowe run docker
for sure, the steps that you layed out in the video doesn't exactly look like it was doing something specific to this.
I perceived it instead as though you were setting up for installing docker
. And that is the kinda step that I've already taken to install docker
on my machine before this time and already have some containers I run.
I will see the video again sometime, but for now I will just stick to my workaround. βπΎ
the video is comprehensive, covering everything but it also covers setting up WSL mode
your fix wouldnt work on max/linux and so cant be commited
WSL is "linux in windows" and gives the best experience for all contributors
your fix wouldnt work on max/linux and so cant be commited
Haha π, ofcourse... That's why its "my workaround".