[GH-ISSUE #23] error "sh: line 1: tsx: command not found" #19

Closed
opened 2026-03-03 13:52:15 +03:00 by kerem · 7 comments
Owner

Originally created by @AGenchev on GitHub (Jul 31, 2024).
Original GitHub issue: https://github.com/jehna/humanify/issues/23

I cloned the repo, installed npm, performed npm install and used this stanza to test it:
npm start -- --local -o deobfuscated.js obfuscated-file.js

unfortunately it cannot find sth called tsx.
What didn't work:
npm install --save-dev ts-node typescript
npm install tsx

I'm not much familiar w node.js.

Originally created by @AGenchev on GitHub (Jul 31, 2024). Original GitHub issue: https://github.com/jehna/humanify/issues/23 I cloned the repo, installed npm, performed npm install and used this stanza to test it: `npm start -- --local -o deobfuscated.js obfuscated-file.js` unfortunately it cannot find sth called tsx. What didn't work: npm install --save-dev ts-node typescript npm install tsx I'm not much familiar w node.js.
kerem closed this issue 2026-03-03 13:52:15 +03:00
Author
Owner

@jehna commented on GitHub (Jul 31, 2024):

Did you run just plain npm install? Please check the readme for getting started instructions

<!-- gh-comment-id:2260507175 --> @jehna commented on GitHub (Jul 31, 2024): Did you run just plain `npm install`? Please check the readme for getting started instructions
Author
Owner

@AGenchev commented on GitHub (Jul 31, 2024):

yes, I did npm install.
didn't install conda, but it is for python and I'll use pip (if I get there).
It seems like problem with node.

<!-- gh-comment-id:2260530830 --> @AGenchev commented on GitHub (Jul 31, 2024): yes, I did npm install. didn't install conda, but it is for python and I'll use pip (if I get there). It seems like problem with node.
Author
Owner

@AGenchev commented on GitHub (Jul 31, 2024):

but, to have done it all, I installed conda and ran:
conda env create -f environment.yaml
The result is "Could not solve for environment specs".
Of course, there are tons of complains like:

 "LibMambaUnsatisfiableError: Encountered problems while solving:
  - nothing provides requested zstd ==1.5.5 hd90d995_0"
  - ..........
<!-- gh-comment-id:2260705747 --> @AGenchev commented on GitHub (Jul 31, 2024): but, to have done it all, I installed conda and ran: `conda env create -f environment.yaml` The result is "Could not solve for environment specs". Of course, there are tons of complains like: ``` "LibMambaUnsatisfiableError: Encountered problems while solving: - nothing provides requested zstd ==1.5.5 hd90d995_0" - .......... ```
Author
Owner

@0xdevalias commented on GitHub (Aug 1, 2024):

tsx is in the package.json dependencies, so it should be installed properly with a npm install:

github.com/jehna/humanify@002fd68d10/package.json (L24)

As a test, I added a new which-tsx script:

  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "tsx src/index.ts",
+   "which-tsx": "which tsx"
  },

And ran it like this (on macOS):

⇒ npm run which-tsx
/Users/devalias/dev/tmp/humanify/node_modules/.bin/tsx

I would expect yours should show something similar; and if not, then perhaps you have some issues with how your environment PATH / node / similar is setup?

What OS / node version / etc are you running?

<!-- gh-comment-id:2261884493 --> @0xdevalias commented on GitHub (Aug 1, 2024): `tsx` is in the `package.json` `dependencies`, so it should be installed properly with a `npm install`: https://github.com/jehna/humanify/blob/002fd68d10f7ff13b80b7c305ad09c9c7f63bc47/package.json#L24 As a test, I added a new `which-tsx` script: ```diff "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "start": "tsx src/index.ts", + "which-tsx": "which tsx" }, ``` And ran it like this (on macOS): ``` ⇒ npm run which-tsx /Users/devalias/dev/tmp/humanify/node_modules/.bin/tsx ``` I would expect yours should show something similar; and if not, then perhaps you have some issues with how your environment `PATH` / node / similar is setup? What OS / node version / etc are you running?
Author
Owner

@AGenchev commented on GitHub (Aug 1, 2024):

it seems your changes are not in the main branch, because git pull says it's up to date. I edited manually package.json to add ""which-tsx": "which tsx"".
Then
"npm run which-tsx
returns empty line.

OS: Arch Linux;
npm --version
10.8.2
node --version
v22.5.1
conda --version
conda 24.5.0
Everything is downloaded/installed yesterday, latest versions available for my Linux. I guess there are specific packages for Mac OS which install properly, but on x86_64 there are other versions (especially these which conda can't find). Also I guess, on my computer npm is somewhat broken and doesn't install the packages which are required.

<!-- gh-comment-id:2262166925 --> @AGenchev commented on GitHub (Aug 1, 2024): it seems your changes are not in the main branch, because git pull says it's up to date. I edited manually package.json to add ""which-tsx": "which tsx"". Then `"npm run which-tsx` returns empty line. OS: Arch Linux; `npm --version` 10.8.2 `node --version` v22.5.1 `conda --version` conda 24.5.0 Everything is downloaded/installed yesterday, latest versions available for my Linux. I guess there are specific packages for Mac OS which install properly, but on x86_64 there are other versions (especially these which conda can't find). Also I guess, on my computer npm is somewhat broken and doesn't install the packages which are required.
Author
Owner

@0xdevalias commented on GitHub (Aug 2, 2024):

it seems your changes are not in the main branch, because git pull says it's up to date

@AGenchev I made the changes locally as a PoC/debug step; they were never intended to be comitted/pushed anywhere.

especially these which conda can't find

tsx has nothing to do with python/conda; it's purely a node thing.

I guess, on my computer npm is somewhat broken and doesn't install the packages which are required

It seems like that might be the case, and would be the area I would be looking to debug things further. It might be worth starting by looking of the tsx package is properly installed in the ./node_modules/ directory after npm install. And also maybe check what paths are included in your PATH env.

Beyond that, might be a bit beyond the type of support that can easily be provided on this repo, as it sounds like it may be more of an environment setup issue rather than an issue with this project.

<!-- gh-comment-id:2264532831 --> @0xdevalias commented on GitHub (Aug 2, 2024): > it seems your changes are not in the main branch, because git pull says it's up to date @AGenchev I made the changes locally as a PoC/debug step; they were never intended to be comitted/pushed anywhere. > especially these which conda can't find `tsx` has nothing to do with python/conda; it's purely a node thing. > I guess, on my computer npm is somewhat broken and doesn't install the packages which are required It seems like that might be the case, and would be the area I would be looking to debug things further. It might be worth starting by looking of the `tsx` package is properly installed in the `./node_modules/` directory after `npm install`. And also maybe check what paths are included in your `PATH` env. Beyond that, might be a bit beyond the type of support that can easily be provided on this repo, as it sounds like it may be more of an environment setup issue rather than an issue with this project.
Author
Owner

@AGenchev commented on GitHub (Aug 2, 2024):

Thanks, I was able to resolve this problem, which likely is related to the node version incompatibility:

  • removed the npm package from OS repo
  • discovered that nvm (Node Version Manager) exists and installed it
  • installed older nodejs (version 20)
  • erased local copy and cloned again the repo
  • npm install worked.

So this problem is solved.

conda env create -f environment.yaml
still fails, but this is not the topic here, so I close this.
Thank you all for assisting with this issue.

<!-- gh-comment-id:2264896849 --> @AGenchev commented on GitHub (Aug 2, 2024): Thanks, I was able to resolve this problem, which likely is related to the node version incompatibility: - removed the npm package from OS repo - discovered that **nvm** (Node Version Manager) exists and installed it - installed older nodejs (version 20) - erased local copy and cloned again the repo - npm install worked. So this problem is solved. `conda env create -f environment.yaml ` still fails, but this is not the topic here, so I close this. Thank you all for assisting with this issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/humanify#19
No description provided.