首页 文章

env:node:没有这样的文件或目录(使用jenkings,windows机器,节点和远程web界面)

提问于
浏览
0

最近我正在进行ios构建,我通过我的IP地址使用远程Web界面远程启动mac slave .

我已经尝试卸载node / npm并重新安装它,但是在安装cordova之后它仍然会出现相同的错误 .

我还检查了我的节点目录是否没有错,它没关系:

enter image description here

我也已经尝试了将 set +e 放在我的shell脚本顶部的解决方案,但之后它仍然无效 .

我已经试图解决这个问题5天了,但仍然没有解决,所以我希望你们可以尝试在这种情况下帮助我 .

ios 构建开始时会发生此错误 .

Started by upstream project "CordovaHelloWorld" build number 97
originally caused by:
Started by user (user)
Building remotely on mac-slave (ios) in workspace 
/Users/(username)/Desktop/jenkinsMacSlave/workspace/CordovaHelloWorld/PLATFORM/ios
> git rev-parse --is-inside-work-tree 
# timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https://github.com/(user)/Jenkins 
# timeout=10
Fetching upstream changes from https://github.com/(user)/Jenkins
> git --version 
# timeout=10
> git fetch --tags --progress https://github.com/(user)/Jenkins 
+refs/heads/:refs/remotes/origin/
Checking out Revision b08e07983673bdc08dcb6e81d65e83a3cb5edc5c 
(origin/Jenkinsios)
> git config core.sparsecheckout 
# timeout=10
> git checkout -f b08e07983673bdc08dcb6e81d65e83a3cb5edc5c
> git rev-list b08e07983673bdc08dcb6e81d65e83a3cb5edc5c 
# timeout=10
[ios] $ /bin/sh -xe 
/var/folders/sj/01rfz4rx1ws_smjvggb_klzw0000gq/T/jenkins150886583207745932.sh
+ set +e
+ /usr/local/bin/cordova platform rm ios --no-telemetry --no-update-notifier
env: node: No such file or directory
+ /usr/local/bin/cordova platform add ios --no-telemetry --no-update-notifier
env: node: No such file or directory
+ /usr/local/bin/cordova build ios --no-telemetry --no-update-notifier
env: node: No such file or directory
Build step 'Execute shell' marked build as failure
Finished: FAILURE

我尝试了很多很多解决方案,但都没有效果 . 我真的希望很快就能解决这个问题,已经提前感谢了!

编辑:

我已经尝试了以下这些答案:

1 回答

  • 0

    已找到解决方案 . 这是mac slave的路径问题 . 需要在Jenkins中添加环境变量: PATH + LOCAL_BIN ---- /usr/local/bin

相关问题