reactjsnode.jsnpmnext.js

npm run dev doesn't update my localhost after the first time


Whenever I run npm run dev(let's say for my nextjs app), it works well for the first time but when I make some changes to my file and then save and check my localhost, it doesn't update the changes. Please tell me the fix.

I only have to press Ctrl+C, terminate the job and then run npm run dev everytime I want to see the changes, but I am sure this is not the way


Solution

  • Well to tell what exactly your problem is you must to provide more information about your project (for example package.json file "scripts" section) but let's assume that you are running a next.js application. To run your project in developing mode you can simply run the following `

    next dev

    also if you want to see or change your project configuration which includes the bunch of scripts that will run your project or build it.. you can check them in packaje.json