npm run dev in typescript project, watch is not working
See original GitHub issue🐛 Bug Report
Changed Typescript files cannot be applied.
To Reproduce
Steps to reproduce the behavior:
- Use master branch to generate typescript project
npm run dev
- change string in example.ts ( server auto restarted )
- /example response didn’t change.
- I have to ctrl+c to terminate
npm run dev
, run agin to make the change applied.
Expected behavior
/example response changed according to 3.'s change.
Your Environment
- node version: 12
- fastify version: 3.0.0-rc2
- os: Mac
setup step: https://github.com/fastify/fastify-cli/issues/131#issuecomment-630192417
Issue Analytics
- State:
- Created 3 years ago
- Comments:15 (9 by maintainers)
Top Results From Across the Web
Is there a way to use npm scripts to run tsc -watch && nodemon
I created two scripts "compile" and "dev". To start developing you simply run npm run dev which starts nodemon and makes it watch...
Read more >3 ways to watch and run your TypeScript projects
1. Using tsc -w and nodemon. This is the most straight forward way. Install nodemon: npm install --save ...
Read more >tsc-watch - npm
Start using tsc-watch in your project by running `npm i tsc-watch`. ... tsc-watch was created to allow an easy dev process with TypeScript....
Read more >[5.4] npm run watch not working - Laracasts
Using 5.4 and mix, when I run npm run watch it compiles once and looks like it is waiting for changes, but when...
Read more >TypeScript Compiling with Visual Studio Code
Another option is to install the TypeScript compiler locally in your project ( npm install --save-dev typescript ) and has the benefit of...
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 Free
Top 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
Ok. Just open a WIP PR and we will discuss on the best way to handle this.
Thanks, @alemagio! I was under the impression that your solution was just a hot-fix until a more permanent solution was found. But I’m happy to just stick with it, if that is what will eventually be merged anyways. 😄