medikoo/cli-color

process is not defined. in webpack5

amotzte opened this issue · 2 comments

Hi,
I'm getting an error after upgrading to webpack5. Appears to be because of the following

, xtermMatch = process.platform === "win32" ? require("./lib/xterm-match") : null;

It seems that process is not defined in webpack5
See https://webpack.js.org/migrate/5/#run-a-single-build-and-follow-advice

Is there any plan to fix this ?

@amotzte this is a Node.js only module. It's not intended for browsers

I had this issue all of a sudden pop up.
I found out that my IDE autocompleted some import with ... from 'cli-color'
This caused webpack to try and bundle cli-color with the client scripts.