Skip to content

Conversation

@worstperson
Copy link
Collaborator

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.

There are two issues here.

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
Copy link

Xiddoc commented Mar 4, 2023

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

@worstperson
Copy link
Collaborator Author

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

@TheShermanTanker
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

js2py.require('paper') => AssertionError: Could not link required node_modules

3 participants