5. @netlify/plugin-gatsby (onPostBuild event)
Uncaught exception, the process will now terminate…
TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator))
at Object.filter (file:///opt/buildhome/node-deps/node_modules/@netlify/build/lib/plugins/ipc.js:32:70)
at ChildProcess.onItem (file:///opt/buildhome/node-deps/node_modules/p-event/index.js:41:35)
at ChildProcess.emit (node:events:525:35)
at ChildProcess.emit (node:domain:489:12)
at emit (node:internal/child_process:946:14)
at processTicksAndRejections (node:internal/process/task_queues:84:21)
base = "/"
publish = "public/"
command = "npm run build && npm run build:lambda"
functions = "lambda"
We’re running two build commands at build time, first we build the Gatsby app and then netlify functions. These are separated because the netlify-lambda build command which builds the functions throws an error with node 18 which our project has, so it we run it separately with NODE_OPTIONS=--openssl-legacy-provider which seems to work. Here’s the actual build commands
And one more thing, I don’t know if this issue is Gatsby related, since the TypeError stacktrace is pointing to file:///opt/buildhome/node-deps/node_modules/@netlify/build/lib/plugins/ipc.js:32:70 .
Looks like the error is coming from some Netlify plugin?
Also, I’m curious why the plugin @netlify/plugin-gatsby appeared for the first time in my build logs yesterday, right as the errors started. Has something changed on Netlify’s end regarding this plugin? Has the plugin always been installed to my app but it has not logged anything to build logs?
This is now resolved, thanks. After switching Netlify build to debug mode, we noticed an error sh: gatsby: not found. This error occurred when Netlify ran our build command gatsby build. We resolved it by installing gatsby-cli separately, before running the build command. Any thoughts on this issue?