android - 'node' is not recognized as an internal or external command error with jenkins -
i trying set continuous code integration of jenkins v1.592 have android hybrid code, i'm, trying build jenkins. have set environment variables ant_home, java_home, android_home, , added path respectively. have added nodejs , npm path.
ant version 1.9.2
java version 1.8.0_25
npm version 1.4.28
cordova android version 3.5.1
c:\users\username>path
gives
c:\users\username\appdata\roaming\npm;c:\program files\nodejs;c:\whateverelse...
jenkins $workspace = c:\program files (x86)\jenkins\jobs\myproject\workspace\
now set cmd prompt jenkins workspace , execute following commands
cd myproject cordova build android
i build_successful after 24 seconds
similarly, when go local jenkins server
the jenkins dashboard shown , have set myproject there , in project configuration have added lines
"cd myproject cordova build android"
in build step , saved configuration. when try build following error
started command line anonymous building in workspace c:\program files (x86)\jenkins\jobs\myproject\workspace updating repository @ revision '2014-12-02t15:20:23.437 +0530' @ revision 263 no change repository since previous build [workspace] $ cmd /c call c:\windows\temp\hudson3297478415472069526.bat
c:\program files (x86)\jenkins\jobs\myproject\workspace>cd myproject
c:\program files (x86)\jenkins\jobs\myproject\workspace\myproject>cordova build android
'node' not recognized internal or external command, operable program or batch file. build step 'execute windows batch command' marked build failure archiving artifacts finished: failure
any appreciated
the same issue exists on mac osx
best regards
several things can @ play here
did add
node
%path%
through command line, or through windows ui? if done through ui, can take affect immediatelly. if done through command line, doesn't take affect until next process spawns shell, therefore jenkins server restart required.jenkins runs "local system" default on windows. listing
c:\users\username
part of paths, i.e. user specific path. did set%path%
users, or userusername
? if it's not set users (or specific user jenkins runs with), jenkins won't see it. can change user service runs as.
2a. if jenkins running "local system" user, account have access c:\users\username
?
- and lastly, if set
%path%
command line, did set permanent entry usingsetx
command?
in either case, job configuration, add build step "execute windows batch command" , type set
(to display environment variables) or @echo %path%
(to see %path%) , verify environment set correctly
Comments
Post a Comment