# Custom nodejs 18 action: cannot find name "fetch"

**URL:** <https://community.auth0.com/t/custom-nodejs-18-action-cannot-find-name-fetch/123583>\
**Category:** Get Help\
**Tags:** configuration, application\
**Created:** [December 22, 2023, 8:06pm UTC](https://community.auth0.com/t/custom-nodejs-18-action-cannot-find-name-fetch/123583 "2023-12-22T20:06:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![joe3](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/joe3/32/12921_2.png) [@joe3](https://community.auth0.com/u/joe3)\
**Post date:** [December 22, 2023, 8:06pm UTC](https://community.auth0.com/t/custom-nodejs-18-action-cannot-find-name-fetch/123583/1 "2023-12-22T20:06:15Z")

</div>

Hi,

According to this blog post[1], the nodejs 18 runtime should support the fetch API natively. However, in the custom action code editor, the fetch function is unavailable with an error: cannot find name “fetch”

I also found a community topic[2] which claims that native fetch is NOT available, and the node-fetch polyfill must be used instead.

Trying to zero in on the actual truth here. Thank you!

[1] [Node 18 Now Available for Actions, Rules, and Hooks](https://auth0.com/blog/node-18-now-available-for-actions-rules-and-hooks/)

[2] [Custom Action: Cannot make an API call via fetch (using Node18)](https://community.auth0.com/t/custom-action-cannot-make-an-api-call-via-fetch-using-node18/115130)

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [December 22, 2023, 11:15pm UTC](https://community.auth0.com/t/custom-nodejs-18-action-cannot-find-name-fetch/123583/3 "2023-12-22T23:15:42Z")

</div>

Hi @joe3,

You should be able to use `fetch` natively in Node 18, even though there is an error stating that it _cannot find name ‘fetch’_. I have just tested and confirmed this.

I will go ahead and pass this feedback to our Engineering teams to resolve this misleading error.

Please let me know if there’s anything else I can do to help.

Thanks!  
Rueben

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [January 5, 2024, 11:15pm UTC](https://community.auth0.com/t/custom-nodejs-18-action-cannot-find-name-fetch/123583/4 "2024-01-05T23:15:58Z")

</div>

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