'node' is not recognized as an internal or external command error with jenkins

后端 未结 1 1072
后悔当初
后悔当初 2021-01-23 05:19

I am trying to set up continuous code integration with the help of jenkins v1.592 I have an android hybrid code, which I\'m, trying to build with jenkins. I have set up environm

相关标签:
1条回答
  • 2021-01-23 06:11

    Several things can be at play here

    1. Did you add node to %PATH% through command line, or through the Windows UI? If done through UI, it can take affect immediatelly. If done through command line, it doesn't take affect until the next process spawns from shell, therefore Jenkins server restart is required.

    2. Jenkins runs as "Local System" by default on Windows. You are listing C:\Users\userName as part of your paths, i.e. a user specific path. Did you set the %PATH% for all users, or just for your user userName? If it's not set for all users (or a specific user that Jenkins runs with), then Jenkins won't see it. You can change what user the service runs as.

    2a. If Jenkins is running as "Local System" user, does that account have access to C:\Users\userName?

    1. And lastly, if you set the %PATH% from command line, did you set it as a permanent entry using setx command?

    In either case, from your job configuration, add a build step "Execute Windows Batch Command" and type just set (to display all environment variables) or @echo %PATH% (to see just the %PATH%) and verify that the environment is set correctly

    0 讨论(0)
提交回复
热议问题