I’ve developed a website in Vue and Node, it’s working just fine in my computer, but when I hosted the backend on a web host and tried to run “npm install” on it to install the dependencies it returned the error “node-gyp not found: make”.
The OS is CentOS and I don’t have sudo access to it.
If someone has any idea of what it can be, I’d be really glad!
2
Answers
I figured out how to solve it. Idk what really happend, but I generated another project, ran "npm init -y", copied the dependencies to the new package.json, ran "npm i" to generate the package-lock.json, copied them into the folder in the web server and ran the "npm i" and it solved the problem. Thanks for helping 😊
You’re going to have to get sudo access to install “build essentials” on the target machine, or have an admin install it for you:
Alternatively, you can try to do a “prebuild”. I would take a look at
prebuildify
(https://github.com/prebuild/prebuildify).I’ve also had luck with ‘pkg’ (https://www.npmjs.com/package/pkg) which packages your entire node app into an executable and can build on any platform for mac, linux, or windows.