# Error when using netlify functions:invoke

**URL:** <https://answers.netlify.com/t/error-when-using-netlify-functions-invoke/13640>\
**Category:** Support\
**Tags:** netlify-cli, lambda-functions\
**Created:** [April 30, 2020, 12:23am UTC](https://answers.netlify.com/t/error-when-using-netlify-functions-invoke/13640 "2020-04-30T00:23:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![coronatimemap.com](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/coronatimemap.com/32/9377_2.png) [@coronatimemap.com](https://answers.netlify.com/u/coronatimemap.com)\
**Post date:** [April 30, 2020, 12:23am UTC](https://answers.netlify.com/t/error-when-using-netlify-functions-invoke/13640/1 "2020-04-30T00:23:38Z")

</div>

I am getting error using invoke command of netlify dev, reference from [cli/netlify-dev.md at main · netlify/cli · GitHub](https://github.com/netlify/cli/blob/master/docs/netlify-dev.md#netlify-functions)

When I try to list the functions via netlify functions:list, I can see their dir and url. And I can test function payload just fine through the local server with netlify dev. But the invoke command does not work for some reason.

netlify functions:invoke --name hello-world  
TypeError: Cannot read property ‘dir’ of undefined

netlify.toml  
[build]  
functions = “./functions”  
publish = “dist”  
[dev]  
framework = “#auto”

---

<div class="post-metadata">

**Author:** ![Dennis](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/dennis/32/34_2.png) [@Dennis](https://answers.netlify.com/u/Dennis)\
**Post date:** [May 4, 2020, 10:06am UTC](https://answers.netlify.com/t/error-when-using-netlify-functions-invoke/13640/2 "2020-05-04T10:06:43Z")

</div>

Hi @coronatimemap.com, I’ve not used that function myself but it looks like you need to have netlify dev running at the same time. Could you try running the local server in another terminal and see if that helps?

---

<div class="post-metadata">

**Author:** ![Dennis](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/dennis/32/34_2.png) [@Dennis](https://answers.netlify.com/u/Dennis)\
**Post date:** [May 4, 2020, 10:09am UTC](https://answers.netlify.com/t/error-when-using-netlify-functions-invoke/13640/3 "2020-05-04T10:09:04Z")

</div>

I also updated your topic title to reflect the issue you are having.
