PiotrDabkowski / Js2Py

JavaScript to Python Translator & JavaScript interpreter written in 100% pure Python🚀 Try it online:
http://piter.io/projects/js2py
MIT License
2.47k stars 261 forks source link

[WIN] Fix node module support #276

Closed worstperson closed 2 years ago

worstperson commented 2 years ago

This is an alternative solution for PR #274 aka 'AssertionError: Could not link required node_modules' under Windows. Fixes #125

This fixes two compatibility issues while touching as little as possible.

One is the ";" operator that does not exist in Windows. I chose "&&" to replace it since it functions the same on both systems. This has the side effect of not running the next command if the previous failed, but it looks like this behavior is fine.

The second is the use of repr on paths. This results in the Windows path separator being escaped, which is not accepted by the Windows shell. My solution was to remove the repr and place the string between double quotes to achieve the same effect, but gain compatibility.

Xiddoc commented 1 year ago

This is a good fix that works for me, why was it closed?

worstperson commented 1 year ago

Too many PRs were open for this issue and #128 is effectively the same patch tbh.

TheShermanTanker commented 8 months ago

Seems like Piotr is working on other stuff and no longer updates Js2Py, can we elect some other maintainers to continue to maintain this project instead? I would very much like to enhance the vm for production use, for one