question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: Cannot read property 'toString' of undefined

See original GitHub issue

Node version:

4.4.4

ShellJS version (the most recent version/Github branch you see the bug on):

0.7.0

Operating system:

OSX 10.11.5 El Captain

Description of the bug:

Typerror while using shell.exec

Example ShellJS command to reproduce the error:

java -jar CMDRunner.jar --tool Reporter --generate-png test.png --input-jtl results.jtl --plugin-type ResponseTimesOverTime --width 800 --height 600

I cannot find a simple command which reproduces the above issue, I am attaching a screenshot of the error message I am getting.

shelljs_bug


Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:17 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
nfischercommented, Aug 10, 2016

Sounds like the root cause of this issue has been solved, so I’ll go ahead and close this. Please ping this thread if the toString issues occur for some other reason.

0reactions
eisenbergrobincommented, Aug 10, 2016

@ariporad: Continually proving my geniusness 😄 . I had no idea I could pass options from node::child_process to shelljs::exec to handle this.

I haven’t reproduced the issue since the fix described above (since my webpack output was way too verbose anyways), but I increased the buffer size in any case:

const options = {
    ...opts,
    maxBuffer: 1024 * 1000, // Increase maxBuffer on node exec for long-running 'watch' commands with a lot of output to stdout
  };
return shell.exec(cmd, options);

Thanks for your help 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: Cannot read property 'toString' of Null in JS
The "Cannot read property 'toString' of null" error occurs when the toString() method is called on a null value. To solve the error,...
Read more >
Why do I get Cannot read property 'toString' of undefined
toString () throws a TypeError. It says string is undefined. I'm not an experienced js developer. Why would this happen? Edit: I call...
Read more >
Cannot read property 'toString' of undefined - Syncfusion
In your shared code snippet, you have assigned value in string type for value property. But the value property accepts only string array...
Read more >
TypeError: Cannot read property 'toString' of undefined
It looks like the zap is working with still sending the information to Active Campaign but it still sends errors. Any help appreciated....
Read more >
Unable to get property 'toString' of undefined or null reference
This issue arises when js/jquery is not able to refer to the element. It is because at the time of rendering the page(view),...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found