question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

npx ts-node myscript.ts fails with ENOENT

See original GitHub issue

I have a script in my package.json like "doit" : "npx ts-node myscript.ts". ts-node@8.6.2 is in my devDependencies and installed. ts-node.cmd is in node_modules/.bin/ts-node.cmd (as well as bash and ps versions) Running the package script with npm run doit works fine. Running npx ultra doit fails with

error error Command ts-node failed with Error: spawn ...\node_modules\.bin\ts-node ENOENT. Is the command on your path?

I’m on Windows 10.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:19 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
manwithafoxcommented, Mar 24, 2020

Now it works 👍 Thanks a lot

1reaction
manwithafoxcommented, Mar 24, 2020

Works like a charm! Thank you so much for the super quick fixes.

Kind regards

Read more comments on GitHub >

github_iconTop Results From Across the Web

'ts-node' is not recognized as an internal or external command ...
I can run it with npx : 127!rsp@mn-r:~/node/test/ts-test-1$ npx ts-node -v ts-node v6.0.3 node v10.1.0 typescript v2.8.3.
Read more >
ts-node-dev - npm
Tweaked version of node-dev that uses ts-node under the hood. It restarts target node process when any of required files changes (as standard ......
Read more >
Hey all I m having issues with seeding data with Prisma and
An error occured while running the seed command: Error: Command failed with ENOENT: ... Trying to run the script manually with ts-node with...
Read more >
How to fix: npm ERR! enoent ENOENT: no such file or ...
If you ever get this error, the hotfix is to follow these steps: ... It should all work fine after that. If these...
Read more >
[Solved]-Error while executing typescript file with ts-node (after ...
json file. The correct shebang to use is #!/usr/bin/env ts-node-script , which is now also documented. Make sure you have the newest version...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found