Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Fajar's avatar
Level 2

npm run watch

hello guys i wanna ask how long does it take to load npm run watch

when i run npm run watch the running process reaches half an hour is not completed

Done Compiled Successfully in 2797ms then stalled

Can you help me

0 likes
4 replies
bobbybouwmann's avatar
Level 88

npm run watch always keeps running. It will watch your files for changes. So if you for example make a change in resources/assets/js/app.js and save the file, it will compile again.

If you only want to run it once you should use npm run dev

1 like
uF4No's avatar

As bobby said, both do the same although watch keeps an eye on your project and automatically compiles it every time one of the files changes (and is saved). I usually run npm run watch while developing so it automatically compiles it. If you just want to compile it once you can run npm run dev.

1 like
Fajar's avatar
Level 2

thank you all for the answers that have been given to me

Greetings from Indonesia and I have not long studied laravel

I thank you all again

1 like

Please or to participate in this conversation.