Deploys keep failing?

Issue: Site keeps failing on deploy. No issues on building locally but as soon as it starts to build get the following error log, not sure what is happening!

Site name: awesome-dubinsky-a69369

Error log: 1:09:16 PM: Build ready to start ^
1:10:04 PM: …/src/common.cc:489:1: error: expected ‘}’ at end of input
1:10:04 PM: } // namespace sharp
1:10:04 PM: ^
1:10:04 PM: sharp.target.mk:157: recipe for target ‘Release/obj.target/sharp/src/common.o’ failed
1:10:04 PM: make: *** [Release/obj.target/sharp/src/commPreformatted texton.o] Error 1
1:10:04 PM: make: Leaving directory ‘/opt/build/repo/node_modules/gatsby-sharp/node_modules/sharp/build’
1:10:04 PM: gyp ERR! build error
1:10:04 PM: gyp ERR! stack Error: make failed with exit code: 2
1:10:04 PM: gyp ERR! stack at ChildProcess.onExit (/opt/buildhome/.nvm/versions/node/v12.18.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
1:10:04 PM: gyp ERR! stack at ChildProcess.emit (events.js:315:20)
1:10:04 PM: gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
1:10:04 PM: gyp ERR! System Linux 4.19.112+
1:10:04 PM: gyp ERR! command “/opt/buildhome/.nvm/versions/node/v12.18.0/bin/node” “/opt/buildhome/.nvm/versions/node/v12.18.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “rebuild”
1:10:04 PM: gyp ERR! cwd /opt/build/repo/node_modules/gatsby-sharp/node_modules/sharp
1:10:04 PM: gyp ERR! node -v v12.18.0
1:10:04 PM: gyp ERR! node-gyp -v v5.1.0
1:10:04 PM: gyp ERR! not ok
1:10:06 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
1:10:06 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
1:10:06 PM: npm ERR! code ELIFECYCLE
1:10:06 PM: npm ERR! errno 1
1:10:06 PM: npm ERR! sharp@0.17.3 install: node-gyp rebuild
1:10:06 PM: npm ERR! Exit status 1
1:10:06 PM: npm ERR!
1:10:06 PM: npm ERR! Failed at the sharp@0.17.3 install script.
1:10:06 PM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
1:10:06 PM: npm ERR! A complete log of this run can be found in:
1:10:06 PM: npm ERR! /opt/buildhome/.npm/_logs/2020-09-15T12_10_06_485Z-debug.log
1:10:06 PM: Error during NPM install
1:10:06 PM: Error running command: Build script returned non-zero exit code: 1
1:10:06 PM: Failing build: Failed to build site
1:10:06 PM: Finished processing build request in 48.649845813s

Any help please guys? Still no idea why it’s happening. I’ve built many Gatsby sites through Netlify and never come across this issue before

Having figured out the above issue which appeared to be node versions. I have managed to get past these issues and successfully build locally.

Upon building through netflify I am getting the following errors:

6:06:21 PM: failed Building production JavaScript and CSS bundles - 19.300s

6:06:22 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 1

6:06:21 PM: error Generating JavaScript bundles failed

6:06:21 PM: Can’t resolve ‘./footer.js’ in ‘/opt/build/repo/src/components’

6:06:21 PM: If you’re trying to use a package make sure that ‘./footer.js’ is installed. If you’re trying to use a local file make sure that the path is correct.

6:06:21 PM: error Generating JavaScript bundles failed

6:06:21 PM: Can’t resolve ‘./header.js’ in ‘/opt/build/repo/src/components’

6:06:21 PM: If you’re trying to use a package make sure that ‘./header.js’ is installed. If you’re trying to use a local file make sure that the path is correct.

the structure of these files is /src/components/header & /src/components/footer, how can this be failing? I have used the same structure before with no issues.

Thanks

Hey there, thanks for reaching out.

What you are describing sounds a bit like a an issue with case sensitivity on our system.

Can you give this a read through and let us know if that fixes the issue?