Unitech / Unitech/pm2

pm2 may currupt `[name]` value of webpack's output path

Open
#3,210 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

S: Open for PR SYS: CLI T: Bug
Dominant language
JavaScript
Stars
43.3k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

What's going wrong?

pm2 may currupt [name] value of webpack's output path

How could we reproduce this issue?

In some situation, [name] value of webpack's output path may be changed to pm2's process' name value what make webpack bundle result is wrong.

Supporting information

image
webpack config

image
pm2 config

image
run webpack using pm2

image
bundle error

Please run the following command (available on PM2 >= 2.6)

$ pm2 report

===============================================================================
--- PM2 REPORT (Sun Oct 15 2017 20:05:13 GMT+0800 (中国标准时间)) -------------------
===============================================================================
--- Daemon -------------------------------------------------
pm2d version         : 2.7.1
node version         : 8.6.0
node path            : undefined
argv                 : N:\Program Files\nodejs\node.exe,C:\Users\Diablohu\AppData\Roaming\npm\node_modules\pm2\lib\Daemon.js
argv0                : node
user                 : undefined
uid                  : N/A
gid                  : N/A
uptime               : 13min
===============================================================================
--- CLI ----------------------------------------------------
local pm2            : 2.7.1
node version         : 8.6.0
node path            : undefined
argv                 : N:\Program Files\nodejs\node.exe,C:\Users\Diablohu\AppData\Roaming\npm\node_modules\pm2\bin\pm2,report
argv0                : node

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

Start by reproducing the reported behavior with the webpack and pm2 configurations shown in the issue, using the supplied pm2 report as environment context. Trace how pm2's process name reaches the webpack invocation and compare the generated output path with the expected [name] value. Done means the bundle output keeps webpack's [name] value when run through pm2.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.