I am new to AWS ec2 instance, I have tried to host my server code on ec2 I have done my instance setup successfully based on the following reference from "https://ourcodeworld.com/articles/read/977/how-to-deploy-a-node-js-application-on-aws-ec2-server".
On the ec2 ubuntu server, I am getting "npm ERR! [email protected] install: node-gyp rebuild
" error when I install node-modules using npm I cmd. I have tried many examples from StackOverflow no one solved my issue. The error message is following below
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ubuntu/.npm/_logs/2020-10-03T15_56_49_786Z-debug.log
If you're using recent macOS or macs they use Catalina. In that case, use these guidelines to use gyp in macs:
https://github.com/nodejs/node-gyp/blob/main/macOS_Catalina.md
this solved the err for me