Site name: https://vectronic.netlify.app
Sourced from: GitHub - vectronic/website: Vectronic website
I have an issue introduced by upgrading the package.json dependency of “netlify-lambda” with a major version change e.g. “^1.6.3” to "^2.0.3.
I use this as part of my site build as follows:
npx netlify-lambda build src/functions
When I do this locally it works fine. However when this runs as part of Netlify deploy I get the following in the deploy logs:
11:14:07 AM: Unexpected token {
11:14:07 AM: Function Dir: /opt/build/repo/build/functions
11:14:07 AM: Skipping functions preparation step: /opt/build/repo/build/functions not found
I cannot work out where this unexpected token { is coming from! Because it only fails on the Netlify deploy I am unable to debug fully what is happening. I have confirmed similar version of Node running locally and on Netlify (8.17.0) and locally it works with Node 12.x and 14.x.
I am not sure what else could be different which is not configured in netlify.toml etc.
At the very least is there any way to increase verbosity of the deploy logs? (Maybe there is, but I haven’t seen an option).
I can stay on netlify-lambda 1.6.3 for now and everything is fine, but at some point I will need to update to the 2.x release.
I haven’t posted this on the netlify-lambda GitHub project as it seems to work absolutely fine for 2.0.x when running locally. So I am suspicious of some difference between local and Netlify deploy environment, but have no idea how to determine or debug the difference.
Thanks in advance!
Nick