Description
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...
> 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.