# Newman CLI Error - Invalid URI http:///Coach

**URL:** <https://community.postman.com/t/newman-cli-error-invalid-uri-http-coach/15201>\
**Category:** Help Hub\
**Tags:** newman-project\
**Created:** [August 20, 2020, 2:44pm UTC](https://community.postman.com/t/newman-cli-error-invalid-uri-http-coach/15201 "2020-08-20T14:44:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aakashjain8693](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@aakashjain8693](https://community.postman.com/u/aakashjain8693)\
**Post date:** [August 20, 2020, 2:44pm UTC](https://community.postman.com/t/newman-cli-error-invalid-uri-http-coach/15201/1 "2020-08-20T14:44:40Z")

</div>

> **Archived topic — this may be out of date.**  
> Newman has been replaced by the **[Postman CLI](https://learning.postman.com/docs/postman-cli/postman-cli-overview/)**, Postman’s official, signed command-line tool. It runs collections as Newman did, and also lints API specs, runs mocks and monitors, and syncs local files with Postman from your terminal, CI/CD pipeline or coding agent.  
> Working with an AI coding agent? The [Postman plugin](https://github.com/postmanlabs/postman-plugin) lets agents in Claude Code, Cursor, Codex and others design, mock, test and ship APIs with Postman.  
> For current help, see the [Postman docs](https://learning.postman.com/docs/), try the free [Postman tools](https://www.postman.com/tools) (no account needed), or join us on [Discord](https://discord.gg/58aNNsRBGR).

Hi,  
So basically I am moving my collections towards the newman CLI where as my collection contain .csv file and environment file.  
When I run command with environment json file, NEWMAN CLI throwing error whereas without environment.json file, able to execute collection.

Step to reproduce:

1. Export the collection.json and environment.json file.
2. Get the .csv file data.
3. Make sure node, npm, newman installed.
4. run the newman command.  
newman run “collection.json file” -e “environment.json file” -d “.csv file”

Example: newman run “D:\Medifast APIs\newman.postman\_collection.json” -e “D:\Medifast APIs\Dev.postman\_environment.json” -d “D:\Medifast APIs\coachRankProgression.csv” OR

newman run newman.postman\_collection.json -e Dev.postman\_environment.json -d coachRankProgression.csv

Actual Value: Above command throwing error as **Invalid URI “http:///Coach”**  
whereas without environment file, Able to run the collection.

Any solution?

Error:

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

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [August 20, 2020, 2:53pm UTC](https://community.postman.com/t/newman-cli-error-invalid-uri-http-coach/15201/3 "2020-08-20T14:53:16Z")

</div>

> Actual Value: Above command throwing error as **Invalid URI “http:///Coach”**

That URL is invalid in the collection.

---

<div class="post-metadata">

**Author:** ![aakashjain8693](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@aakashjain8693](https://community.postman.com/u/aakashjain8693)\
**Post date:** [August 21, 2020, 6:17am UTC](https://community.postman.com/t/newman-cli-error-invalid-uri-http-coach/15201/4 "2020-08-21T06:17:59Z")

</div>

No, URL is correct thats why working without the env. collection file.Means when URL is hardcoded without any env. variable, it"s working fine.

Actual URL(without env. variable): [https://wq](https://wq)\*\*\*/Coaches/Coach  
Actual URL(with env. variable): {{coachRequestUrl}}/Coach  
whereas coachRequestUrl=https://wq\*\*\*/Coaches

I can see error message where as I can observe:

1. It’s not underlying variable value inside the URL.
2. And its taking http istead of “https”

So any suggestion beyond that?

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [August 21, 2020, 6:34am UTC](https://community.postman.com/t/newman-cli-error-invalid-uri-http-coach/15201/5 "2020-08-21T06:34:19Z")

</div>

> [@aakashjain8693](#):
>
> Actual URL(without env. variable): [https://wq](https://wq)\*\*\*/Coaches/Coach  
> Actual URL(with env. variable): {{coachRequestUrl}}/Coach  
> whereas coachRequestUrl=[https://wq](https://wq)\*\*\*/Coaches

Whatever value `{{coachRequestURL}}` is, it’s not resolving to that in the Newman run - So the URL is invalid. `http:///Coach" ` is missing the part of the URL to make it valid.

Ensure that every change on the requests with the app is saved, the environment variables are at least in the `initial` value field before exporting, any value only in the `current` field will is not part of the file.

What does `cat D:\Medifast APIs\Dev.postman_environment.json` give you?

If it looks like this, the value is not there:

```auto
{
	"name": "Your Env Name",
	"values": [
		{
			"key": "coachRequestURL",
			"value": "",
			"enabled": true
		}
	]
}

```
