A
A
Artemy Family2020-09-14 17:28:10
Node.js
Artemy Family, 2020-09-14 17:28:10

How to install node-gyp rebuild?

All the best!

[root]# npm install
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data

> [email protected] install /home/shop/node_modules/bcrypt/node_modules/node-addon-api
> node-gyp rebuild

/usr/lib/node_modules/npm/bin/node-gyp-bin/node-gyp: line 5: /usr/local/lib/node_modules/node-gyp/bin/node-gyp.js: No such file or directory
npm ERR! Linux 3.10.0-1127.18.2.el7.x86_64
npm ERR! argv "/usr/local/n/versions/node/12.18.3/bin/node" "/usr/bin/npm" "install"
npm ERR! node v12.18.3
npm ERR! npm  v2.15.11
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the node-addon-api package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs node-addon-api
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls node-addon-api
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/shop/npm-debug.log


Guys, what to do!?. I tried everything.

This is when calling npm install

{
  "name": "shop",
  "version": "1.0.0",
  "description": "Shops",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "node index"
  },
  "dependencies": {
    "express": "*",
    "mongoose": "*",
    "bcrypt": "*",
    "passport": "*",
    "passport-jwt": "*",
    "body-parser": "*",
    "cors": "*",
    "jsonwebtoken": "*"
  },
  "author": "Vasya",
  "license": "ISC"
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question