-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Labels
Description
Describe the bug
Step implementations using ES Module format (import instead of require, etc) cause an error at runtime.
To Reproduce
Steps (or project) to reproduce the behavior:
- Clone this repo
- cd examples
- Run
gauge run - See error
Line 8: Unexpected token <=== "import" (step_implementation.js)
Line 10: Unexpected token <=== "export" (vowels.js)
Logs
13-01-2026 17:43:19.728 [Gauge] [DEBUG] Started concepts parsing.
13-01-2026 17:43:19.729 [Gauge] [DEBUG] 0 concepts parsing completed.
13-01-2026 17:43:19.729 [Gauge] [DEBUG] Started specifications parsing.
13-01-2026 17:43:19.729 [Gauge] [DEBUG] 1 specifications parsing completed.
13-01-2026 17:43:19.729 [Gauge] [DEBUG] Parsing completed.
13-01-2026 17:43:19.942 [js] [ERROR] Line 8: Unexpected token
13-01-2026 17:43:19.943 [js] [ERROR] Line 10: Unexpected token
13-01-2026 17:43:19.953 [Gauge] [DEBUG] Attempting to connect to grpc server at port: 65033
13-01-2026 17:43:19.953 [Gauge] [DEBUG] Successfully made the connection with runner with port: 65033
13-01-2026 17:43:19.953 [Gauge] [DEBUG] Validation started.
Expected behavior
Node vm should be loading step implementations as ES Module files, not Common JS
Screenshots
Versions:
- Node.js 22.20.0
Gauge version: 1.6.22
Commit Hash: 7ea39af
Plugins
-------
html-report (4.4.0)
js (5.0.1)
screenshot (0.3.2)
Reactions are currently unavailable