简体   繁体   English

Jenkins构建失败-错误:未找到:make

[英]Jenkins build fail - Error: not found: make

I try to create CI for my npm module, but I have the problem with NPM install command. 我尝试为我的npm模块创建CI,但是我遇到了NPM install命令的问题。 I try to globally install gyp but nothing works for me. 我尝试在全球范围内安装gyp,但对我而言无效。 Is it problem with dependencies (package.json file is added after console output) or some configurations on jenkins is missing? 依赖关系是否存在问题(控制台输出后添加package.json文件),或者缺少jenkins的某些配置? Node version is 11.6.0 . 节点版本为11.6.0

Console output : 控制台输出:

gyp ERR! build error 
gyp ERR! stack Error: not found: make
gyp ERR! stack     at getNotFoundError (/var/jenkins_home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/current_node/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp ERR! stack     at F (/var/jenkins_home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/current_node/lib/node_modules/npm/node_modules/which/which.js:68:19)
gyp ERR! stack     at E (/var/jenkins_home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/current_node/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack     at /var/jenkins_home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/current_node/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack     at /var/jenkins_home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/current_node/lib/node_modules/npm/node_modules/isexe/index.js:42:5
gyp ERR! stack     at /var/jenkins_home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/current_node/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
gyp ERR! stack     at FSReqCallback.oncomplete (fs.js:160:21)
gyp ERR! System Linux 4.9.0-8-amd64
gyp ERR! command "/var/jenkins_home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/current_node/bin/node" "/var/jenkins_home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/current_node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /var/jenkins_home/workspace/defined-id/defined-id/node_modules/bufferutil
gyp ERR! node -v v11.6.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
npm WARN defined-id@1.0.0 No description
npm WARN The package js-sha256 is included as both a dev and production dependency.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bufferutil@3.0.5 install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the bufferutil@3.0.5 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!     /var/jenkins_home/.npm/_logs/2019-03-19T08_59_17_472Z-debug.log
Build step 'Execute shell' marked build as failure
Finished: FAILURE

Package.json 的package.json

{
    "name": "defined-id",
    "version": "1.0.0",
    "description": "",
    "main": "lib/index.js",
    "types": "lib/index.d.ts",
    "scripts": {
        "test": "jest --config jestconfig.json",
        "build": "tsc",
        "format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"",
        "lint": "tslint -p tsconfig.json",
        "prepare": "yarn run build",
        "prepublishOnly": "yarn test && yarn run lint",
        "preversion": "yarn run lint",
        "version": "yarn run format && git add -A src",
        "postversion": "git push && git push --tags"
    },
    "repository": {
        "type": "git"
    },
    "author": "Geens NPO",
    "license": "ISC",
    "devDependencies": {
        "@types/jest": "^23.3.9",
        "jest": "^23.6.0",
        "js-sha256": "^0.9.0",
        "prettier": "^1.15.2",
        "ts-jest": "^23.10.5",
        "ts-node": "^8.0.3",
        "tslint": "^5.11.0",
        "tslint-config-prettier": "^1.16.0",
        "typescript": "^3.1.6"
    },
    "dependencies": {
        "@types/node": "^10.12.18",
        "@types/uuid": "^3.4.4",
        "base-58": "0.0.1",
        "base58check": "^2.0.0",
        "create-hmac": "^1.1.7",
        "js-sha256": "^0.9.0",
        "jsonld": "^1.4.0",
        "key-encoder": "^1.1.7",
        "nem2-sdk": "0.10.2",
        "ripemd160": "^2.0.2",
        "tweetnacl": "^1.0.1",
        "tweetnacl-util": "^0.15.0"
    }
}

Execute shell : 执行shell:

npm install --prefix defined-id
npm run build --prefix defined-id
npm run test --prefix defined-id

I suspect that is not a Jenkins error. 我怀疑这不是詹金斯错误。

Execute the following line in the Linux where NPM commands are executed: 在执行NPM命令的Linux中执行以下行:

sudo apt-get install build-essential

And build again your Jenkins job. 并再次建立您的詹金斯工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM