Closed rucharnaud closed 4 years ago
Thanks for reporting @rucharnaud
What version of both Node and the CLI are you using? Any chance you can share the collection you are using? (remove any secrets, export from the app)
Hi @matt-ball ,
I'm using version 0.0.25 of postman-cli and node v12.16.1.
Here is the collection I've been using:
Perso.postman_collection.json.zip
Regards,
Arnaud
Thanks for sharing.
@rucharnaud please try 0.0.26 and let me know if that fixes the issue!
Yes it does. Thank you @matt-ball
Great! I'll close this out - feel free to open another issue if you run into other bugs/have a feature request.
Hi,
tried to setup and experiment with postman-cli.
Here's the error I had: node:9881) UnhandledPromiseRejectionWarning: TypeError: item.find is not a function at mapItemToFile (/Users/myself/Workspace/postman-cli-sandbox/node_modules/@matt.ball/postman-cli/src/bootstrap.js:24:105) at recurseCollectionForItems (/Users/myself/Workspace/postman-cli-sandbox/node_modules/@matt.ball/postman-cli/src/lib/recurse-collection.js:32:20) at processTicksAndRejections (internal/process/task_queues.js:97:5)
I added a little bit of logging. It seems that the item at stake is: { name: 'Random cat pictures', _postman_id: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx', protocolProfileBehavior: { disableBodyPruning: true }, request: { method: 'GET', header: [], url: { raw: 'https://aws.random.cat/meow', protocol: 'https', host: [Array], path: [Array] } }, response: [] }
Its type is: 'request'
I guess the issue is coming from : const scriptObj = (item.event && item.event.find((el) => el.listen === type)) || (!item.event && item.find((el) => el.listen === type))
But I could not really decipher what we are trying to do, so I did not investigate further.