# Linter: \[msg\] 'Buffer' is not defined

**URL:** https://discourse.nodered.org/t/linter-msg-buffer-is-not-defined/101810
**Category:** General
**Created:** [21 September 2026 12:18 UTC](https://discourse.nodered.org/t/linter-msg-buffer-is-not-defined/101810 "2026-09-21T12:18:59Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![protonmw](https://avatars.discourse-cdn.com/v4/letter/p/b3f665/32.png) [@protonmw](https://discourse.nodered.org/u/protonmw)
#### Post date: [21 September 2026 12:18 UTC](https://discourse.nodered.org/t/linter-msg-buffer-is-not-defined/101810/1 "2026-09-21T12:18:59Z")

</div>

Hi experts!

I'm using `Buffer.from(xyz);` in a function node and it works exactly as intended, but linter gives an error:

> [msg] 'Buffer' is not defined.

How can I prevent this?

(Or: how to put ascii character 182 into a string and send it correct via tcp?)

---

<div class="post-metadata">

### Author: ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)
#### Post date: [21 September 2026 15:36 UTC](https://discourse.nodered.org/t/linter-msg-buffer-is-not-defined/101810/2 "2026-09-21T15:36:24Z")

</div>

How are you using the buffer ?

```auto
const bla = "hello"
const test = Buffer.from(bla)

msg.payload = test

return msg;

```

no linting error (?)

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [21 September 2026 15:51 UTC](https://discourse.nodered.org/t/linter-msg-buffer-is-not-defined/101810/3 "2026-09-21T15:51:47Z")

</div>

That does give the error, assuming that you have nrlint installed.

I think it is because Buffer is a nodejs thing, not basic javascript, though I think there is an option you can select somewhere to tell it to pick up the nodjs types.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [21 September 2026 15:55 UTC](https://discourse.nodered.org/t/linter-msg-buffer-is-not-defined/101810/4 "2026-09-21T15:55:29Z")

</div>

@protonmw the workaround is to open the linter panel, click the dropdown arrow against the error and select to disable that warning.
