Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update repo docs to add instructions for windows WSL mode #106

Open
babblebey opened this issue Feb 27, 2024 · 4 comments
Open

Update repo docs to add instructions for windows WSL mode #106

babblebey opened this issue Feb 27, 2024 · 4 comments
Labels
documentation Improvements or additions to documentation

Comments

@babblebey
Copy link
Contributor

babblebey commented Feb 27, 2024

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:

  1. Clone the repository on a Windows machine.
  2. 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...

> uninbox-monorepo@0.0.1 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/postal-puppet@0.0.1 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.
@McPizza0
Copy link
Member

McPizza0 commented Feb 27, 2024

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

@babblebey
Copy link
Contributor Author

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. ✌🏾

@McPizza0
Copy link
Member

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

@babblebey
Copy link
Contributor Author

your fix wouldnt work on max/linux and so cant be commited

Haha 😃, ofcourse... That's why its "my workaround".

@McPizza0 McPizza0 changed the title Local development: command in all dev scripts not compactible with window machine Update repo docs to add instructions for windows WSL mode Feb 28, 2024
@BlankParticle BlankParticle added the documentation Improvements or additions to documentation label Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants