# Newman error for package library scripts

**URL:** <https://community.postman.com/t/newman-error-for-package-library-scripts/62652>\
**Category:** Help Hub\
**Tags:** newman-project, collections, import, package-library\
**Created:** [June 26, 2024, 7:57am UTC](https://community.postman.com/t/newman-error-for-package-library-scripts/62652 "2024-06-26T07:57:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![spacecraft-technol17](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@spacecraft-technol17](https://community.postman.com/u/spacecraft-technol17)\
**Post date:** [June 26, 2024, 7:57am UTC](https://community.postman.com/t/newman-error-for-package-library-scripts/62652/1 "2024-06-26T07:57:28Z")

</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).

When I tried to run an imported postman collection which contains few test scripts in package library, I’m getting an error as _pm.require is not a function_ in Newman.

Any solution to update the package via external javascript file before running postman collection file:

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/9/2/929433d0d3b4fc8cfeae17c3d9320a7059e19001.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:** [June 26, 2024, 4:01pm UTC](https://community.postman.com/t/newman-error-for-package-library-scripts/62652/2 "2024-06-26T16:01:12Z")

</div>

Hey @spacecraft-technol17 👋

Welcome to the Postman Community! :postman:

Newman doesn’t support the Package Library Scripts, you can use the [Postman CLI](https://learning.postman.com/docs/postman-cli/postman-cli-overview/) to run these but these are only available for certain plan types.

> **[Run a collection using the Postman CLI | Postman Learning Center](https://learning.postman.com/docs/postman-cli/postman-cli-run-collection/#running-a-collection-that-uses-packages)**
>
> Postman is a collaboration platform for API development. Postman's features simplify each step of building an API and streamline collaboration so you can create better APIs—faster.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [June 29, 2024, 4:02pm UTC](https://community.postman.com/t/newman-error-for-package-library-scripts/62652/3 "2024-06-29T16:02:10Z")

</div>

Closed on June 29, 2024, 4:02pm UTC

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