I am moving from nodemon
to ts-node-dev
but I am not able to run my index.ts
file using ts-node-dev
.
I did the following:
yarn add ts-node-dev --dev
In my package.json
I have:
"devDependencies": {
...
"nodemon": "^1.19.2",
"ts-node": "8.3.0",
"ts-node-dev": "^1.0.0-pre.56",
"typescript": "3.6.3"
}
If I run ts-node-dev
or ts-node-dev src/index.ts
I get the error:
command not found: ts-node-dev
What am I doing wrong? It seems to me that is correctly installed.
My scripts
"scripts": {
"start": "nodemon --exec ts-node src/index.ts",
"dev": "ts-node-dev src/index.ts"
}
You have 3 options here:
./node_modules/.bin/ts-node-dev src/index.ts
npx
npx ts-node-dev src/index.ts
npm i -g ts-node-dev src/index.ts
ts-node-dev src/index.ts
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With