Maher Ben Taleb Ali
Maher Ben Taleb Ali

Reputation: 329

node.js executable hangs up unexpectedly

I created an executable using nodejs. when I run the executable, it ,sometimes, hangs up at somepoint. however clicking CTR + C in the terminal makes the executable to continue. this only happen on windows. on linux everything works fine.

Upvotes: 3

Views: 1713

Answers (1)

Silvan Bregy
Silvan Bregy

Reputation: 2734

Problem

This is probably related to windows Quick Edit Mode. The option makes the cmdlet randomly wait for user input and blocks until it gets it... I don't know what's the idea behind this. So instead CTRL + C you could basically press any key for continuing it. This happens with Windows Command line in general and is not related to nodejs.

Solution

  • Start your program as usual
  • right click the terminal window and open settings
  • Disable Quickedit-mode setting
  • => Problem should not occur anymore. As far as i know, the setting should persist.

(My Windows has german language. translations: QuickEdit-Modus = Quickedit-mode and settings = Eigenschaften enter image description here

Other ideas

  • Run your application with Windows-Task Scheduler
  • Use another terminal e.g. git bash

Upvotes: 3

Related Questions