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.

Allow to set NodeJS options

See original GitHub issue
  • Version: C8 7.11.0; Node v17.4.0
  • Platform: Linux rwauwprlc0058 5.4.0-100-generic #113-Ubuntu SMP Thu Feb 3 18:43:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

I have unit tests using ava and one test is failing to fail. Because NodeJS probably increased the stack size limit. I have a Scheme interpreter in JavaScript and I’m executing (! 1000), without TCO (tail call optimizations) it should overflow the stack. I want to hardcode the stack size with an option, so my tests are independent of the environment. But I’m not able to set it:

I’ve tried:

c8 node --stack-size=512 ./node_modules/.bin/ava
## Error [ERR_WORKER_INVALID_EXEC_ARGV]: Initiated Worker with invalid execArgv flags: --stack-size=512
node --stack-size=512 ./node_modules/.bin/c8 ava
## this flag is ignored because ava is executed without options

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
jcubiccommented, Mar 3, 2022

Unfortunately, Node doesn’t support --stack-size setting in NODE_OPTIONS.

0reactions
jcubiccommented, Dec 22, 2022

It seems that --stack-size doesn’t work with Node 18 anymore.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Handle an OPTIONS request with CORS in Node JS - Medium
This is to make sure you are allowed to make HTTP request to that domain so, those petitions will be handle by CORS...
Read more >
Command-line API | Node.js v19.3.0 Documentation
Node.js comes with a variety of CLI options. These options expose built-in debugging, multiple ways to execute scripts, and other helpful runtime options....
Read more >
Why doesn't adding CORS headers to an OPTIONS route ...
I found the easiest way is to use the node.js package cors. The simplest usage is: var cors = require('cors') var app =...
Read more >
How to use CORS in Node.js with Express - Section.io
Express allows you to configure and manage an HTTP server to access resources from the same domain. The three parts that form an...
Read more >
Express cors middleware
CORS is a node.js package for providing a Connect/Express middleware that can be used to enable CORS with various options.
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