sahat / hackathon-starter

A boilerplate for Node.js web applications
MIT License
34.77k stars 8.14k forks source link

Encountering an issue with the script execution in Windows environment. #1294

Open BenjaminKoshyBiju opened 5 months ago

BenjaminKoshyBiju commented 5 months ago

Hi, so when I did npm install one of the scripts prepare="if [ "$NODE_ENV" != "production" ]; then husky install; fi" does not install properly giving me this error image Since I am using a windows cmd and its a bash syntax I wasnt able to install it. I changed the prepare script for my Windows env and it seems to work image I belive we can make this script cross-platform by using cross-env to the dependencies to set environment variables in a platform-independent way. Making the prepare script cross-platform would improve usability for both Windows and Linux users, ensuring a smoother experience for all contributors. Is making this script cross-platform a good idea? @YasharF I would like to create a new PR if I get the heads up.

YasharF commented 4 months ago

I will investigate this next time I am doing maintenance. In the meantime, as a workaround, you can use WSL in Windows. Let me know if you have any questions about going forward with WSL.