Using this as an example: Netlify-Labs headless chrome
I have successfully set up lambda functions (pretty damn cool!), but I am having a few issues.
I have node v8.10 installed locally and have
strictEngine set in the
package.json . I have also pushed this to netlify so I can try outside of my local environment.
What I am trying to accomplish
I need a headless chrome instance so that I can render a canvas and convert it to a png file and send it to Contentful, so using lambda functions should be a good solution.
What I am having problems with.
but I am having trouble importing some packages. Such as, https://github.com/alixaxel/chrome-aws-lambda without getting many errors.
ModuleNotFoundError: Module not found: Error: Can't resolve 'iltorb'
I install iltorb…
Module not found: Error: Can't resolve 'bufferutil'
ERROR in **/node_modules/iltorb/build/bindings/iltorb.node 1:0 Module parse failed: Unexpected character '' (1:0)
I install bufferutil… then these continue to appear…
ERROR in /home/mibru/code/clients/mark-maps/node_modules/iltorb/build/bindings/iltorb.node 1:0 Module parse failed: Unexpected character '' (1:0) You may need an appropriate loader to handle this file type. (Source code omitted for this binary file) @ /home/mibru/code/clients/mark-maps/node_modules/iltorb/index.js 10:39-78 @ /home/mibru/code/clients/mark-maps/node_modules/chrome-aws-lambda/source/index.js
Would anyone mind helping me solve this? Or if you know other packages, I am open to using another solution, as long as I can use lambda functions.
I realize it could be including binaries but I am unsure how to work with this stuff.
I appreciate in advance the patience.