When I moved the n-api of centos running without any problem to Ubuntu and built it, an error occurred.
I ran:
npm init
npm install node-gyp
npm install --save bindings
npm run build
What I have tried:
//package.json
{
"name": "node",
"version": "1.0.0",
"description":"",
"main": "index.js",
"scripts":{
"test": "echo \"Error: no test specified\" && exit 1",
"install": "node-gyp rebuild"
},
"author": "lee",
"license": "ISC",
"gypfile": true,
"dependencies": {
"bindings": "^1.5.0"
}
}
//error
npm ERR! Linux 5.4.0-109-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "build"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! missing script: build
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https: github.com="" npm="" issues="">
npm ERR! Please include the following file with any support request:
npm ERR! /home/worlture/node/npm-debug.log