env: node: No such file or directory (using jenkings, windows machine, node 和远程网络接口)
env: node: No such file or directory (using jenkings, windows machine, node and a remote web interface)
最近我正在做一个 ios 构建,我通过我的 IP 地址使用远程 Web 界面远程启动 mac 从站。
我已经尝试卸载 node / npm 并重新安装它,但在我安装后它仍然出现相同的错误 cordova。
我还检查了我的节点目录是否有误,没问题:
我也已经尝试过将 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
我尝试了很多很多解决方案,但 none 有效。
我真的希望这个问题能尽快得到解决,已经提前谢谢了!
编辑:
我已经尝试了以下这些答案:
- https://github.com/nodejs/node-v0.x-archive/issues/3911
- Express.js: No Such file or directory
- Cannot install NodeJs: /usr/bin/env: node: No such file or directory
- browserify error /usr/bin/env: node: No such file or directory
已找到解决方案。这是 mac slave 的路径问题。需要在 Jenkins 中添加环境变量:PATH + LOCAL_BIN
---- /usr/local/bin
最近我正在做一个 ios 构建,我通过我的 IP 地址使用远程 Web 界面远程启动 mac 从站。
我已经尝试卸载 node / npm 并重新安装它,但在我安装后它仍然出现相同的错误 cordova。
我还检查了我的节点目录是否有误,没问题:
我也已经尝试过将 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
我尝试了很多很多解决方案,但 none 有效。 我真的希望这个问题能尽快得到解决,已经提前谢谢了!
编辑:
我已经尝试了以下这些答案:
- https://github.com/nodejs/node-v0.x-archive/issues/3911
- Express.js: No Such file or directory
- Cannot install NodeJs: /usr/bin/env: node: No such file or directory
- browserify error /usr/bin/env: node: No such file or directory
已找到解决方案。这是 mac slave 的路径问题。需要在 Jenkins 中添加环境变量:PATH + LOCAL_BIN
---- /usr/local/bin