NaN returned with no line number

Hey folks I have already resolved my NaN issue but I thought I’d ask the community for suggestions on how better to find/troubleshoot this. see the output below.

             /\      |‾‾| /‾‾/   /‾‾/   
           /\  /  \     |  |/  /   /  /    
          /  \/    \    |     (   /   ‾‾\  
         /          \   |  |\  \ |  (‾)  |
      / __________ \  |__| \__\ \_____/ .io

ERRO[0002] could not initialize ‘v1_subs_GET_scenario.js’: could not load JS test ‘file:///GitHub/k6-demo/GET_scenario.js’: error parsing script options: json: unsupported value: NaN

This happened because I fat fingered a variable name and use parseInt of that param which was assigned null presumably.

export let partner_Details_peak = 19

import { partner_details_peak } from ../commons.js

let get_partner_details_peak = parseInt(partner_details_peak)

Notice the uppercase “D” in details in th export where I meant to use lowercase “d” everywhere. which means the parseInt(NULL) caused the NaN

shouldn’t a line number be returned? I had to tear apart my code because I didn’t even know where to set a debug breakpoint.


1 Like

Create an issue here with all the details and someone from the team will let you know if that’s an expected behaviour or not. I believe the number should be noted on the error msg.

Sorry been a blistering couple of months. I’ll enter an issue when I get back from PTO :). Happy Holidays everyone.