Jenkins Jenkin在Mac系统构建期间未能生成新进程

Jenkins Jenkin在Mac系统构建期间未能生成新进程,jenkins,npm,build,jenkins-pipeline,Jenkins,Npm,Build,Jenkins Pipeline,我们有一个react本机应用程序,并使用Jenkins for CI/CD对其进行了配置。当从构建窗口(execute shell)通过Jenkins运行npm安装命令时,其获取失败。 我正在使用最新jenkins版本的node:v10.16.3和npm:6.9.0 这是上次运行的日志 15:52:30 [cavionnovus-IOS] $ /bin/sh -xe /Users/Shared/Jenkins/tmp/jenkins5253804416691912910.sh 15:52:30

我们有一个react本机应用程序,并使用Jenkins for CI/CD对其进行了配置。当从构建窗口(execute shell)通过Jenkins运行npm安装命令时,其获取失败。 我正在使用最新jenkins版本的node:v10.16.3和npm:6.9.0

这是上次运行的日志

15:52:30 [cavionnovus-IOS] $ /bin/sh -xe /Users/Shared/Jenkins/tmp/jenkins5253804416691912910.sh
15:52:30 + export PATH=/usr/local/bin
15:52:30 + PATH=/usr/local/bin
15:52:30 + npm install
15:52:34 npm WARN deprecated deep-assign@3.0.0: Check out `lodash.merge` or `merge-options` instead.
15:52:36 npm WARN deprecated core-js@1.2.7: core-js@<2.6.8 is no longer maintained. Please, upgrade to core-js@3 or at least to actual version of core-js@2.
15:52:40 npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
15:53:47 
15:53:47 > fsevents@1.2.9 install /Users/Shared/Jenkins/Home/workspace/cavionnovus-IOS/node_modules/fsevents
15:53:47 > node install
15:53:47 
15:53:47 
15:53:47 > grpc@1.23.3 install /Users/Shared/Jenkins/Home/workspace/cavionnovus-IOS/node_modules/grpc
15:53:47 > node-pre-gyp install --fallback-to-build --library=static_library
15:53:47 
15:53:48 npm WARN react-navigation-stack@1.9.4 requires a peer of react-native-screens@^1.0.0 || ^1.0.0-alpha but none is installed. You must install peer dependencies yourself.
15:53:48 npm WARN react-navigation-drawer@2.2.2 requires a peer of react-native-screens@^1.0.0 || ^1.0.0-alpha but none is installed. You must install peer dependencies yourself.
15:53:48 npm WARN eslint-plugin-react@7.12.4 requires a peer of eslint@^3.0.0 || ^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
15:53:48 npm WARN eslint-plugin-react-native@3.6.0 requires a peer of eslint@^3.17.0 || ^4 || ^5 but none is installed. You must install peer dependencies yourself.
15:53:48 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
15:53:48 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 install: `node install`
15:53:48 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: spawn sh ENOENT
15:53:48 
15:53:48 npm ERR! file sh
15:53:48 npm ERR! path sh
15:53:48 npm ERR! code ELIFECYCLE
15:53:48 npm ERR! errno ENOENT
15:53:48 npm ERR! syscall spawn sh
15:53:48 npm ERR! grpc@1.23.3 install: `node-pre-gyp install --fallback-to-build --library=static_library`
15:53:48 npm ERR! spawn sh ENOENT
15:53:48 npm ERR! 
15:53:48 npm ERR! Failed at the grpc@1.23.3 install script.
15:53:48 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

请帮我了解一下这个问题

贵公司是否使用私人注册?还是默认的公共注册表?如果是私有注册表,请确保在Jenkins中正确设置了npm配置中的“注册表”。您还可以将“.npmrc”文件放入所需的配置中。@RamBabuS:我们没有使用任何注册表。您是否可以尝试在jenkins slave
npm install-g node gyp中全局安装更新的版本?
@RamBabuS:npm命令在作为不同的系统用户从工作区尝试相同版本时起作用(用户名:Test).但不以系统用户的身份与Jenkins合作。那么,我们如何以系统日志用户(Test)而不是系统日志用户的身份运行Jenkins作业呢
export PATH=/usr/local/bin
$sudo npm install