entropic-dev / entropic

🦝 :package: a package registry for anything, but mostly javascript 🦝 🦝 🦝
https://discourse.entropic.dev/
Apache License 2.0
5.29k stars 151 forks source link

bug: development on Windows #266

Open fetis opened 5 years ago

fetis commented 5 years ago

Is this a feature request or a bug?

bug

Expected behavior:

npm install just works

Actual behavior:

postinstall scripts fail on Windows platform.

I know Windows is not very friendly platform for web-development, but ds is supposed to be cross-platform tool, so it would be nice have development env running there as well.

I suggest to replace direct bash command with npm package (like loop) or script which will execute npm i for desired directories.

Environment info (where relevant)

zacanger commented 5 years ago

I think this is a good idea, since right now my PR (https://github.com/entropic-dev/entropic/pull/263) on hacking in Windows is pretty much just "good luck." This would probably supersede https://github.com/entropic-dev/entropic/pull/259.

I don't have Windows to test on, do you know if the install scripts are the only major issue? Last time I tried to get Docker with Linux containers working on Windows, I think I gave up after two days and a lot of tears.

fetis commented 5 years ago

@zacanger ds works for me and I haven't faced any issues so far. I'm getting more familiar with the project and I'm planning to try the registry locally as well.

fetis commented 5 years ago

ok, I give up.

I made postinstall script work for the whole repo, but there're more scripts In registry test and start which require bash-like variables NODE_ENV=dev and will not run without big modifications.

docker-compose works but need some adjustments in run scripts

I think there's no sense to put more efforts into it.

zacanger commented 5 years ago

Do you know if all those thing work in WSL? I wonder if the best thing for now would be to just recommend that folks use WSL or some other Unix-y layer in Windows, rather than trying to make sweeping changes across the project to make it Windows-friendl.

fetis commented 5 years ago

Do you know if all those thing work in WSL?

@zacanger I need to install this first. It might be challenging as well 🙈

toddself commented 5 years ago

@zacanger ms provides free VMs with windows installed specifically for things like this (its how I used to test IE) (also not that you should need obligated to solve this issue!)

There is some relevant discussion in discourse about this and post-install scripts.

I don't think we've discussed what to do about legacy packages requiring them though

fetis commented 5 years ago

@toddself cli label is not fully relevant. I would say cli development is quite possible so far, rather than registry.

toddself commented 5 years ago

@fetis the bug mentions ds which is the ci tool and it failing to do something? (as in the bug exists in the cli tool and not the registry component)

fetis commented 5 years ago

@toddself https://github.com/entropic-dev/entropic/blob/master/package.json#L55 that's the original bug. it affects all the projects.

I fixed it and moved further, but encountered more and more problems https://github.com/entropic-dev/entropic/issues/266#issuecomment-502490830

toddself commented 5 years ago

ah! sorry for the confusion!

fetis commented 5 years ago

current status https://github.com/fetis/entropic/tree/win_dev