medikoo / cli-color

Colors and formatting for the console
ISC License
676 stars 34 forks source link

process is not defined. in webpack5 #40

Open amotzte opened 2 years ago

amotzte commented 2 years ago

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

https://github.com/medikoo/cli-color/blob/9072cda305181dcc64d657d4de95a813db6dbdf3/bare.js#L20

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 ?

medikoo commented 2 years ago

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

luisreyes commented 1 year ago

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.