Yarn build fails on node-gyp.js

I need advice to debug deploy Netlify App

Whenever I trigger a build it fails. When I clean the cache before, it also fails .The log provides an error message but it is not clear to me. Locally I am able to build, using yarn. Both netlify environment and my local installed Yarn version are the same = v 1.22.4. Below tha last error code snippet from the log

Failed to execute '/opt/buildhome/.nvm/versions/node/v12.18.0/bin/node /opt/build/repo/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/opt/build/repo/node_modules/grpc/src/node/extension_binary/node-v72-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/opt/build/repo/node_modules/grpc/src/node/extension_binary/node-v72-linux-x64-glibc --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)

Can anyone advice what to do here?

Hey @Marc,
I believe this is an issue with the Node version. Do you know what version you’re using locally?

Hi Jen, I use node -v 10.16.3 locally

Thanks. You’re using v12.18.0 on Netlify- do you want to try setting NODE_VERSION = 10 in your environment variables and seeing if that fixes things for you?

Thanks,
I added the env variable and build now succeeds. Now when I request the netlify generated url I get a message ‘Page Not Found Looks like you’ve followed a broken link or entered a URL that doesn’t exist on this site.’.

Any idea what’s missing here?

Ok, I fixed the ‘Page not found’ error.

I renamed the folder the applkication lives in but angular.json architect.build.options.outputPath was still pointing to the old location so that’s why the page could not be found after the build…

My bad - thanks for assistance!

1 Like