Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npx compatibility #115

Open
reiradford opened this issue Nov 26, 2024 · 0 comments
Open

npx compatibility #115

reiradford opened this issue Nov 26, 2024 · 0 comments

Comments

@reiradford
Copy link

When running npx odiff --help on Windows, I receive this error:

$ npx odiff --help

MZ�


SyntaxError: Invalid or unexpected token
    at wrapSafe (node:internal/modules/cjs/loader:1469:18)
    at Module._compile (node:internal/modules/cjs/loader:1491:20)
    at Object..js (node:internal/modules/cjs/loader:1689:10)
    at Module.load (node:internal/modules/cjs/loader:1318:32)
    at Function._load (node:internal/modules/cjs/loader:1128:12)
    at TracingChannel.traceSync (node:diagnostics_channel:315:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5)
    at node:internal/main/run_main_module:36:49

Node.js v22.11.0

I believe the reason for this is that the little shell script that gets installed to node_modules/.bin/odiff.cmd is trying to run the odiff.exe binary file via node (node node_modules/odiff-bin/bin/odiff.exe) instead of just running it directly.

I realize npx isn't explicitly stated as a supported option for running odiff, but it seemed like an easier option than requiring everyone to change the PATH environment variable. Or is there a better option besides installing it globally?

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

No branches or pull requests

1 participant