# Collection running in Postman but not with newman

**URL:** <https://community.postman.com/t/collection-running-in-postman-but-not-with-newman/34562>\
**Category:** Help Hub\
**Created:** [April 18, 2022, 4:31pm UTC](https://community.postman.com/t/collection-running-in-postman-but-not-with-newman/34562 "2022-04-18T16:31:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SRIDZQ44](https://avatars.discourse-cdn.com/v4/letter/s/aeb1de/32.png) [@SRIDZQ44](https://community.postman.com/u/SRIDZQ44)\
**Post date:** [April 18, 2022, 4:31pm UTC](https://community.postman.com/t/collection-running-in-postman-but-not-with-newman/34562/1 "2022-04-18T16:31:47Z")

</div>

**Your question may already have an answer on the community forum. Please search for related topics, and then read through the [guidelines](https://community.postman.com/t/about-the-just-getting-started-category/37) before creating a new topic.**

> Here’s an outline with best practices for making your inquiry.

_My question_: I am getting following error in Newman but not in postman collection

this is my code in collection pre script  
reading external file for body payload

 ![image](https://us1.discourse-cdn.com/getpostman/original/2X/a/a705b448cf1fcec863d2e9ae14599be80bc5a17b.png)

then in the request script i am using this variable to traverse and get my payload object

 ![image](https://us1.discourse-cdn.com/getpostman/original/2X/b/bbfa81fd7ae2dff72ae0774c57afe93d53e3d517.png)

when i run getting # failure detail

1. TypeError Cannot read properties of undefined (reading ‘0’)  
at prerequest-script  
inside “ManufacturerInterface / InvoiceRequest”

_Details (like screenshots)_:

 ![image](https://us1.discourse-cdn.com/getpostman/original/2X/2/2210e1725527bd28cdc50810e2d7825363dddd8d.png)

_How I found the problem_:

_I’ve already tried_:
