nightmare-lambda-tutorial icon indicating copy to clipboard operation
nightmare-lambda-tutorial copied to clipboard

Does this lib support Node v.10 ?

Open iblessedi opened this issue 5 years ago • 10 comments

I used this lib with Node v8 on Lambda and it worked well. But I got an email from AWS that very soon Node v8 will be suspended on Lambda, everybody needs to upgrade to Node v10. I tried and get an error

RangeError: Maximum call stack size exceeded at Array.JSON.stringify (/var/runtime/node_modules/lambda-logging/Layout.js:63:45)

the same code which worked on node 8 won't work on node 10.

Can this be solved?

iblessedi avatar Nov 11 '19 17:11 iblessedi

I am also seeing this issue and have isolated the problem to this. Does anyone have a workaround for Node 10.x runtime env?

Antditto avatar Nov 12 '19 16:11 Antditto

I have same issue. I tried to upgrade to Node 10, but I get an error like @iblessedi . We have to wait for fix... Hope it will come soon.

olexstad avatar Nov 12 '19 17:11 olexstad

Side question- I don't recall seeing any announcement about AWS removing Node V8 support "very soon"... could someone please link me to that?

themattrobinson avatar Nov 12 '19 17:11 themattrobinson

Side question- I don't recall seeing any announcement about AWS removing Node V8 support "very soon"... could someone please link me to that?

https://docs.aws.amazon.com/lambda/latest/dg/runtime-support-policy.html

Antditto avatar Nov 12 '19 17:11 Antditto

Thanks @Antditto- not sure how I missed that.

Well while we're on the topic of updating the lib to support Node v10, it would also be the perfect time to update the Electron binary to a (much) newer version.

themattrobinson avatar Nov 12 '19 17:11 themattrobinson

The /var/runtime/node_modules/lambda-logging/Layout.js:63:45 is actually part of AWS lambda runtime (which AWS Lambda team works on).

I wonder whether you encounter this error every time when running nightmare on Node 10?

Or only under certain circumstances?

Also is there more to the stack trace?

Obviously there's some problem with JSON stringification of very deep object... Did Node 10x change max depth of JSON object? Also I wonder why is it Array.JSON.Stringify ? From what I know JSON is an object [[prototype]] linked to Object not to Array...

dimkir avatar Nov 13 '19 20:11 dimkir

I see this each time I run my code. Also I see this even when I run it locally via SAM.

RangeError: Maximum call stack size exceeded at Array.JSON.stringify (/var/runtime/node_modules/lambda-logging/Layout.js:63:45) at JSON.stringify () at TextLayout.format (/var/runtime/node_modules/lambda-logging/Layout.js:63:29) at ConsoleAppender.append (/var/runtime/node_modules/lambda-logging/ConsoleAppender.js:27:28) at Logger.putEvent (/var/runtime/node_modules/lambda-logging/Logger.js:77:20) at process.on.error (/var/runtime/index.js:32:10) at process.emit (events.js:198:13) at process._fatalException (internal/bootstrap/node.js:497:27)

iblessedi avatar Nov 14 '19 10:11 iblessedi

This library does not support Node 10! And in Feb 2020 AWS won't allow us to create function using Node 8. We moved to Puppeteer - that was the easiest solution for us.

iblessedi avatar Jan 16 '20 19:01 iblessedi

This library does not support Node 10! And in Feb 2020 AWS won't allow us to create function using Node 8. We moved to Puppeteer - that was the easiest solution for us.

We are also in the process of moving to Puppeteer.

themattrobinson avatar Jan 16 '20 19:01 themattrobinson

I think it would be great if the author wrote on the main page of the lib that currently it is not supported. This may save somebody's time...

iblessedi avatar Jan 16 '20 19:01 iblessedi