Я пытаюсь создать CI для моего модуля npm, но у меня проблема с командой установки NPM. Я пытаюсь глобально установить gyp, но у меня ничего не работает. Это проблема с зависимостями (файл package.json добавляется после вывода на консоль) или некоторые конфигурации на jenkins отсутствуют? Версия узла: 11.6.0 .
Выход на консоль:
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
{
"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"
}
}
Выполнить оболочку:
npm install --prefix defined-id
npm run build --prefix defined-id
npm run test --prefix defined-id