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.

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:

  1. Use master branch to generate typescript project
  2. npm run dev
  3. change string in example.ts ( server auto restarted )
  4. /example response didn’t change.
  5. 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:closed
  • Created 3 years ago
  • Comments:15 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
fox1tcommented, Oct 7, 2020

Ok. Just open a WIP PR and we will discuss on the best way to handle this.

1reaction
soulchildcommented, Apr 27, 2021

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. 😄

Read more comments on GitHub >

github_iconTop 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 >

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