Nodejs app imp install Error ' error [email protected] install: `node-gyp rebuild`', How to fix it?

I am getting following error when i Execute npm i in my nodejs server app, Please help me to fix.

757 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS:   linux
757 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
758 verbose stack Error: [email protected] install: `node-gyp rebuild`
758 verbose stack Exit status 1
758 verbose stack     at EventEmitter.<anonymous> (/home/ubuntu/.nvm/versions/node/v12.14.1/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
758 verbose stack     at EventEmitter.emit (events.js:223:5)
758 verbose stack     at ChildProcess.<anonymous> (/home/ubuntu/.nvm/versions/node/v12.14.1/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
758 verbose stack     at ChildProcess.emit (events.js:223:5)
758 verbose stack     at maybeClose (internal/child_process.js:1021:16)
758 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
759 verbose pkgid [email protected]
760 verbose cwd /home/ubuntu/code/api.crawlink.com.v2
761 verbose Linux 4.4.0-1092-aws
762 verbose argv "/home/ubuntu/.nvm/versions/node/v12.14.1/bin/node" "/home/ubuntu/.nvm/versions/node/v12.14.1/bin/npm" "i"
763 verbose node v12.14.1
764 verbose npm  v6.13.4
765 error code ELIFECYCLE
766 error errno 1
767 error [email protected] install: `node-gyp rebuild`
767 error Exit status 1
768 error Failed at the [email protected] install script.
768 error This is probably not a problem with npm. There is likely additional logging output above.
769 verbose exit [ 1, true ]

Install NVM using following command

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash

Change you node js version and try.

User NVM to manage different node versions in a single system: nvm install 10.16.0
It might work.

Log in to reply