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)
[build]
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
Iβll take a look at the docs you linked. Hopefully we can figure something out. This site is actually for a large customer and at the moment Iβm unable to create new deployments for the site.
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?