npx ts-node myscript.ts fails with ENOENT
See original GitHub issueI 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:
- Created 4 years ago
- Comments:19 (10 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Now it works 👍 Thanks a lot
Works like a charm! Thank you so much for the super quick fixes.
Kind regards