Getting the same error, after following the directions exactly. It’s really strange, because it auto-completed the name of the package (in the format @my-team/my-package and the name of the function within the package. So it obviously “sees” the package during editing, but not during runtime.
@sgurungcassini@material-administra9 Sorry that you’re facing this issue. I would need some help to debug this. Can you share the exported collection with this request? You can remove any sensitive info from it.
Note: Packages will not be exported with the collection so you don’t have to worry about leaking that info.
You can also choose to share this with [email protected] and mention this community thread.
I also got feedback from Postman Support. It appears Lou (postman support engineer) was able to re-produce this issue (See screenshot shared to me below).
The issue reference ID is #195965 assigned to Louis Tsiros.
As per your request, to assist with investigation. I am sending you and [email protected] a collection which re-produces this issue.
@sgurungcassini The error in this screenshot seems to be different. It seems that the function status200 is not exported from the package. Can you check if you’re exporting it?
I have the same error that was reported on my desktop app. But I can confirm that I don’t have the same error in the browser. So it seems needs to be provided a fix for the postman desktop app
I believe there are two distinct issues surfacing on this thread. First of all, packages cannot be used within other packages at the moment. If the error message mentions something along the lines of “Error in package X: Cannot find package Y”, then this is the cause. This is something we’ll build out as an improvement as we see more adoption, and we’ll be adding clearer messaging within the app to make this clear.
Secondly, there’s the issue of packages not resolving directly within the pre-request or post-response scripts. This looks like a bug, but it’s not something everyone is encountering so we’re working on identifying the conditions which trigger it and any workarounds which may be available. For starters, if you run into this problem please try using the “Refresh results” button in the Test Results tab to see if it resolves the problem as a one-off:
We’ll continue working on finding and addressing the root cause, but in the meantime please let us know if this (admittedly, not great workaround) helps to unblock your runs.
I am seeing this issue pretty much across all of the API requests I am using. I did just try to refresh the results, but this did not change anything. I am still just kind of stuck.
I’m really excited about this new feature, but I think I’ll wait a while for the initial issues to be ironed out before I start a major refactor of all our collections.
Once it’s working properly this will be a massive improvement and remove a load of duplicated code I have from copying and pasting shared functions to each new collection I create.