Unitech / Unitech/pm2

Replace/remove/fix vizion dependency causing annoying popups flashing in Windows

Open
#5,801 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
43.3k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

When pm2 restarts a node process it creates flashing popups. When working with files that automatically save and use a watch this is extremely annoying.

To reproduce:

  1. Create a new repo with git init
  2. Add index.js file containing setInterval to keep the process runnning i.e. a line setInterval(() => console.log('test'), 1000);
  3. At least one commit is needed to reproduce the problem so: git add ./index.js && git commit -m "whatever"
  4. pm2 start index.js --watch
  5. Make a change in index.js. The annoying popups will flash for a split of a second every time the file is updated.

Workaround: Run with pm2 start index.js --watch --no-vizion

This issue was introduced in version 4.5 where Vizion dependency was upgraded from 0.2.13 to 2.x.
Downgrading the dependency to 0.2.13 or disabling vizion with { vizion: false } process.json or when using CLI pm2 ...--no-vizion fixes the issue. I don't know what role vizion plays but it needs to be either replaced with something up to date or vizion needs to be patched/fixed

Also described here but this could've been a different issue originally https://github.com/Unitech/pm2/issues/2182

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the Windows flashing popups with index.js by running pm2 start index.js --watch after a commit, then compare it with --no-vizion and the { vizion: false } process.json workaround. Start by tracing the Vizion dependency used during watched restarts; done means watch mode no longer flashes popups while Vizion remains enabled or is cleanly replaced or fixed.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
cli, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.