[GH-ISSUE #5834] [bug]: [cli test] TEST_SCRIPT_ERROR Script execution failed: SyntaxError: Unexpected token 'export' #2286

Closed
opened 2026-03-16 23:51:03 +03:00 by kerem · 3 comments
Owner

Originally created by @Leon-Luu on GitHub (Feb 4, 2026).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5834

Originally assigned to: @jamesgeorge007 on GitHub.

Is there an existing issue for this?

  • I have searched existing issues and this bug hasn't been reported yet

Platform

Web App

Browser

Chrome

Operating System

Windows

Bug Description

On CLI testing we are seeing error: TEST_SCRIPT_ERROR Script execution failed: SyntaxError: Unexpected token 'export'

Image

The script in the collection is correct, no issue at all on the UI collection running.

Image Image

When try to remove the scripts the SyntaxError: Unexpected token 'export' still persist...

Test with:
hopp -v => 0.30.1
Hoppscotch.io latest (2026.1.0)

Deployment Type

Hoppscotch Cloud

Version

No response

Originally created by @Leon-Luu on GitHub (Feb 4, 2026). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5834 Originally assigned to: @jamesgeorge007 on GitHub. ### Is there an existing issue for this? - [x] I have searched existing issues and this bug hasn't been reported yet ### Platform Web App ### Browser Chrome ### Operating System Windows ### Bug Description On CLI testing we are seeing error: TEST_SCRIPT_ERROR Script execution failed: SyntaxError: Unexpected token 'export' <img width="925" height="691" alt="Image" src="https://github.com/user-attachments/assets/172ca3d3-0ef9-4e6e-83fc-80579f697cb1" /> The script in the collection is correct, no issue at all on the UI collection running. <img width="1061" height="868" alt="Image" src="https://github.com/user-attachments/assets/ddaa4528-660a-4d67-96d1-8469e6d154a5" /> <img width="1197" height="361" alt="Image" src="https://github.com/user-attachments/assets/15f0cec8-9ab2-415d-8f8b-6e4cc08de3c8" /> When try to remove the scripts the SyntaxError: Unexpected token 'export' still persist... **Test with:** hopp -v => 0.30.1 Hoppscotch.io latest (2026.1.0) ### Deployment Type Hoppscotch Cloud ### Version _No response_
kerem 2026-03-16 23:51:03 +03:00
  • closed this issue
  • added the
    bug
    cli
    labels
Author
Owner

@jamesgeorge007 commented on GitHub (Feb 4, 2026):

Thanks for reporting. We’ve identified the root cause, and it will be addressed in the upcoming release.

In the meantime, you can try exporting the collection from the app, removing any script-level export {}; references, re-importing it, and then running it from the CLI with the updated collection ID.

Image
<!-- gh-comment-id:3847880614 --> @jamesgeorge007 commented on GitHub (Feb 4, 2026): Thanks for reporting. We’ve identified the root cause, and it will be addressed in the upcoming release. In the meantime, you can try exporting the collection from the app, removing any script-level `export {};` references, re-importing it, and then running it from the CLI with the updated collection ID. <img width="297" height="56" alt="Image" src="https://github.com/user-attachments/assets/4d634047-6dc1-438d-8b40-ea5667b544f5" />
Author
Owner

@Leon-Luu commented on GitHub (Feb 4, 2026):

That's quick, thanks

<!-- gh-comment-id:3847949350 --> @Leon-Luu commented on GitHub (Feb 4, 2026): That's quick, thanks
Author
Owner

@jamesgeorge007 commented on GitHub (Feb 5, 2026):

This is now addressed in Hoppscotch CLI v0.30.2, closing.

<!-- gh-comment-id:3852919016 --> @jamesgeorge007 commented on GitHub (Feb 5, 2026): This is now addressed in [Hoppscotch CLI v0.30.2](https://www.npmjs.com/package/@hoppscotch/cli?activeTab=versions), closing.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#2286
No description provided.