Currently, it’s challenging to debug scripts effectively in Postman because the error messages provided are often vague or misleading. For example, when encountering an “Unexpected token” error, the feedback pointed to unrelated issues based on the documentation and community advice.
Suggestion: To improve the developer experience, error messages should be more precise and context-specific. In this case, instead of a generic “Unexpected token” error, it would be helpful if the message identified the specific part of the script where the JSON parsing failed or where the syntax issue occurred. This would save time and reduce frustration when debugging scripts.
In the context of your particular error, I don’t believe that it’s vague or misleading:
Error in package '@team_name/package_name': Unexpected token ')'"
It’s telling you that there is a error in the named package and that there is an unexpected token in your script. This was the case because it was missing the } and instead found a ) that it wasn’t expecting.
More direct linking or visibility can be added here to zero in on the specific location (line number, etc) of your error but it sounded like you found the issue without that. I will raise this as feedback with the team though.