# Request for v3: Remove ANSI formatting codes from package install output

**URL:** <https://discourse.nodered.org/t/request-for-v3-remove-ansi-formatting-codes-from-package-install-output/58248>\
**Category:** Feature Requests\
**Created:** [12 February 2022 23:51 UTC](https://discourse.nodered.org/t/request-for-v3-remove-ansi-formatting-codes-from-package-install-output/58248 "2022-02-12T23:51:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [12 February 2022 23:51 UTC](https://discourse.nodered.org/t/request-for-v3-remove-ansi-formatting-codes-from-package-install-output/58248/1 "2022-02-12T23:51:56Z")

</div>

Currently, if you look at the install log from the palette manager, you may get something like:

```auto
2022-02-12T23:42:38.158Z Install : node-red-contrib-telegrambot 11.2.3

2022-02-12T23:42:38.195Z npm.cmd install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-telegrambot@11.2.3
2022-02-12T23:42:52.101Z [err] e[37;40mnpme[0m
2022-02-12T23:42:52.102Z [err] e[0me[30;43mWARNe[0m e[0me[35mdeprecatede[0m har-validator@5.1.5: this library is no longer supported
2022-02-12T23:42:52.102Z [err] e[0m
2022-02-12T23:42:52.239Z [err] e[37;40mnpme[0m
2022-02-12T23:42:52.240Z [err] e[0me[30;43mWARNe[0m e[0me[35mdeprecatede[0m request-promise@4.2.6: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
2022-02-12T23:42:52.240Z [err] e[0m
2022-02-12T23:42:52.343Z [err] e[37;40mnpme[0m
2022-02-12T23:42:52.343Z [err] e[0me[30;43mWARNe[0m e[0me[35mdeprecatede[0m uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
2022-02-12T23:42:52.343Z [err] e[0m
2022-02-12T23:42:52.349Z [err] e[37;40mnpme[0m e[0m
2022-02-12T23:42:52.350Z [err] e[30;43mWARNe[0m e[0me[35mdeprecatede[0m request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
2022-02-12T23:42:52.350Z [err] e[0m
2022-02-12T23:42:55.050Z [out] 
2022-02-12T23:42:55.050Z [out] added 96 packages in 15s
2022-02-12T23:42:55.099Z rc=0

```

It would be really nice if those ANSI characters were got rid of to make it easier to read.

The fix is easy enough, just add `--color=false` to the npm command.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [13 February 2022 06:57 UTC](https://discourse.nodered.org/t/request-for-v3-remove-ansi-formatting-codes-from-package-install-output/58248/2 "2022-02-13T06:57:57Z")

</div>

Odd that I don't see them anywhere I run.

But yes, it's a quick PR if anyone was so inclined.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [13 February 2022 15:44 UTC](https://discourse.nodered.org/t/request-for-v3-remove-ansi-formatting-codes-from-package-install-output/58248/3 "2022-02-13T15:44:03Z")

</div>

I suspect that it depends on how you run NR and what default terminal it picks up. There will be a flag in the terminal somewhere that declares whether it supports colour so when you run a command, it will be inheriting that setting despite the fact that it is actually running in an environment that doesn't actually support ANSI colour.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [13 February 2022 18:18 UTC](https://discourse.nodered.org/t/request-for-v3-remove-ansi-formatting-codes-from-package-install-output/58248/4 "2022-02-13T18:18:00Z")

</div>

while yes an easy PR for someone to do - you can also just run `npm config set color false` to configure your local npm environment

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [13 February 2022 18:23 UTC](https://discourse.nodered.org/t/request-for-v3-remove-ansi-formatting-codes-from-package-install-output/58248/5 "2022-02-13T18:23:13Z")

</div>

You could, but then you wouldn't get the colour output when you actually want it - ie when you are actually in the terminal. 😀

I had the same problem with the npm commands in uibuilder which is why I knew the answer.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [13 February 2022 18:56 UTC](https://discourse.nodered.org/t/request-for-v3-remove-ansi-formatting-codes-from-package-install-output/58248/6 "2022-02-13T18:56:29Z")

</div>

meh - colour/readability - pays your money - takes your choice. just suggesting it as a workaround while waiting for v3.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [14 April 2022 18:56 UTC](https://discourse.nodered.org/t/request-for-v3-remove-ansi-formatting-codes-from-package-install-output/58248/7 "2022-04-14T18:56:37Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
