dmtrKovalenko / dmtrKovalenko/odiff

npx compatibility

Open
#115 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
Zig
Stars
3.2k
Forks
115
PR merge metrics
No merged PRs in 30d

Description

When running `npx odiff --help` on Windows, I receive this error:
```sh
$ 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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.