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.

'ts-node' is not recognized as an internal or external command

See original GitHub issue

nodemon ./src/index.ts

[nodemon] 2.0.14 [nodemon] to restart at any time, enter rs [nodemon] watching path(s): . [nodemon] watching extensions: ts,json [nodemon] starting ts-node ./src/index.ts ‘ts-node’ is not recognized as an internal or external command, operable program or batch file. [nodemon] app crashed - waiting for file changes before starting…

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:8
  • Comments:16 (3 by maintainers)

github_iconTop GitHub Comments

23reactions
BignonAGcommented, Jan 9, 2022

In order to fix this issue, you could install ts-node globally :

npm install -g ts-node

https://stackoverflow.com/questions/44764004/ts-node-is-not-recognized-as-an-internal-or-external-command-operable-program

17reactions
abonvicinicommented, Nov 26, 2021

I have the same problem. Trying different ways to solve this issue i found a solution creating a new file in the root directory for the config of nodemon. Now i can be able to run my project without any problem

The config file called nodemon.json have this inside:

{
  "restartable": "rs",
  "ignore": [".git", "node_modules/", "build/"],
  "watch": ["/index.ts"],
  "execMap": {
    "ts": "node -r ts-node/register"
  },
  "env": {
    "NODE_ENV": "development"
  },
  "ext": "js,json,ts"
}

And in my package.json, my dev script call the config file for nodemon like this: "dev": "nodemon --config nodemon.json index.ts",

For the moment, that works for me, but i will try to find a different way to implement nodemon, without having the necessity of create a config file to call it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

'ts-node' is not recognized as an internal or external ...
1) Install nodemon locally --> npm i nodemon · 2) In your package. · 3) Now run npm start (this will automatically run...
Read more >
'ts-node' is not recognized as an internal or external ...
'ts-node' is not recognized as an internal or external command # · Open the start search and type in env and then click...
Read more >
'ts-node' is not recognized as an internal or external ...
'ts-node' is not recognized as an internal or external command, operable program or batch file ; 1. you need to install ts-node globally...
Read more >
How to resolve 'node' is not recognized as an internal ...
How to resolve 'node' is not recognized as an internal or external command error after installing Node.js ?
Read more >
'Node' Is Not Recognized As An Internal Or External ...
'node' is not recognized as an internal or external command, operable program or batch file ❓ [How to Solve] · Open Control Panel...
Read more >

github_iconTop Related Medium Post

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