jonnyzzz / TeamCity.Node

Node.js, NPM and Phantom.JS runners for TeamCity
Apache License 2.0
309 stars 49 forks source link

Doesn't after nodejs update to 6.11.1 #135

Open vicmosin opened 7 years ago

vicmosin commented 7 years ago

I have TC 10.0.4 and just updated nodejs to 6.11.1. I updated PATH variables as well. node -v and npm --version gives me correct versions. BUT I can't start the agent which worked before. It fails with the following error:

[2017-07-27 09:10:40,952]   INFO - onfig.BuildAgentSystemInfoImpl - Node NVM installer runner is not available: Windows is not supported 
[2017-07-27 09:10:40,983]   INFO - .processes.ProcessExecutorImpl - Starting process: Execution(program=cmd.exe, arguments=[/c, node, --version]) 
[2017-07-27 09:10:41,092]   INFO - s.node.agent.NodeToolsDetector - node 6.11.1 was detected 
[2017-07-27 09:10:41,092]   INFO - .processes.ProcessExecutorImpl - Starting process: Execution(program=cmd.exe, arguments=[/c, npm, --version]) 
[2017-07-27 09:10:42,968]   INFO - s.node.agent.NodeToolsDetector - npm was not found or failed, exitcode: 1 
[2017-07-27 09:10:42,968]   INFO - s.node.agent.NodeToolsDetector - StdOut:  
[2017-07-27 09:10:42,968]   INFO - s.node.agent.NodeToolsDetector - StdErr: module.js:471
    throw err;
    ^

Error: Cannot find module 'C:\Windows\system32\config\systemprofile\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:389:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:504:3 

As I already said, PATH is correct i.e. points to latest nodejs version and you can see in the logs as well. Any ideas why TC still tries to get npm in system32 folder?

jonnyzzz commented 7 years ago

You may need running build agent under real user. Currently it is running under system account, that is the reason of that weird paths

On Jul 27, 2017 7:52 PM, "Victor Mosin" notifications@github.com wrote:

I have TC 10.0.4 and just updated nodejs to 6.11.1. I updated PATH variables as well. node -v and npm --version gives me correct versions. BUT I can't start the agent which worked before. It fails with the following error:

[2017-07-27 09:10:40,952] INFO - onfig.BuildAgentSystemInfoImpl - Node NVM installer runner is not available: Windows is not supported [2017-07-27 09:10:40,983] INFO - .processes.ProcessExecutorImpl - Starting process: Execution(program=cmd.exe, arguments=[/c, node, --version]) [2017-07-27 09:10:41,092] INFO - s.node.agent.NodeToolsDetector - node 6.11.1 was detected [2017-07-27 09:10:41,092] INFO - .processes.ProcessExecutorImpl - Starting process: Execution(program=cmd.exe, arguments=[/c, npm, --version]) [2017-07-27 09:10:42,968] INFO - s.node.agent.NodeToolsDetector - npm was not found or failed, exitcode: 1 [2017-07-27 09:10:42,968] INFO - s.node.agent.NodeToolsDetector - StdOut: [2017-07-27 09:10:42,968] INFO - s.node.agent.NodeToolsDetector - StdErr: module.js:471 throw err; ^

Error: Cannot find module 'C:\Windows\system32\config\systemprofile\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.runMain (module.js:604:10) at run (bootstrap_node.js:389:7) at startup (bootstrap_node.js:149:9) at bootstrap_node.js:504:3

As I already said, PATH is correct i.e. points to latest nodejs version and you can see in the logs as well. Any ideas why TC still tries to get npm in system32 folder?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jonnyzzz/TeamCity.Node/issues/135, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPprzFjvqxFLOuypeZh4RLTmQ0d9RzDks5sSM5cgaJpZM4OloCg .

vicmosin commented 7 years ago

@jonnyzzz thanks for reply. But why it appeared just now? And why agent can't see globally installed nodejs..