Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Exception when placing work directory outside of agent (linux, osx) #44

Closed
joaomoreno opened this issue Jul 30, 2015 · 5 comments
Closed
Assignees

Comments

@joaomoreno
Copy link
Member

If I create a build agent at /agent, it will use a child of that directory as a working directory.

I want to use a separate directory as a working directory, for performance reasons. I edited the .agent file and changed it to /work.

Build steps now fail with

##[Error] 2015-07-30T22:27:10.941Z: module.js:338
##[Error] 2015-07-30T22:27:10.943Z:     throw err;
##[Error] 2015-07-30T22:27:10.943Z:           ^
##[Error] 2015-07-30T22:27:10.943Z: Error: Cannot find module 'vso-task-lib'
##[Error] 2015-07-30T22:27:10.943Z:     at Function.Module._resolveFilename (module.js:336:15)
##[Error] 2015-07-30T22:27:10.943Z:     at Function.Module._load (module.js:278:25)
##[Error] 2015-07-30T22:27:10.943Z:     at Module.require (module.js:365:17)
##[Error] 2015-07-30T22:27:10.943Z:     at require (module.js:384:17)
##[Error] 2015-07-30T22:27:10.943Z:     at Object.<anonymous> (/work/tasks/NpmInstall/0.1.2/npminstall.js:2:10)
##[Error] 2015-07-30T22:27:10.943Z:     at Module._compile (module.js:460:26)
##[Error] 2015-07-30T22:27:10.943Z:     at Object.Module._extensions..js (module.js:478:10)
##[Error] 2015-07-30T22:27:10.943Z:     at Module.load (module.js:355:32)
##[Error] 2015-07-30T22:27:10.943Z:     at Function.Module._load (module.js:310:12)
##[Error] 2015-07-30T22:27:10.943Z:     at Function.Module.runMain (module.js:501:10)
##[Error] 2015-07-30T22:27:10.943Z: 
##[Error] 2015-07-30T22:27:11.811Z: Return code: 1

Is this not supported?

@chrispat
Copy link
Contributor

I don’t believe this is supported net because node looks up the hierarchy for modules. In order to enable this we would need to add the modules location to the explicit lookup path environment variable for node.

From: João Moreno [mailto:notifications@github.com]
Sent: Thursday, July 30, 2015 6:31 PM
To: Microsoft/vso-agent vso-agent@noreply.github.com
Subject: [vso-agent] Exception when placing work directory outside of agent (linux, osx) (#44)

If I create a build agent at /agent, it will use a child of that directory as a working directory.

I want to use a separate directory as a working directory, for performance reasons. I edited the .agent file and changed it to /work.

Build steps now fail with

##[Error] 2015-07-30T22:27:10.941Z: module.js:338

##[Error] 2015-07-30T22:27:10.943Z: throw err;

##[Error] 2015-07-30T22:27:10.943Z: ^

##[Error] 2015-07-30T22:27:10.943Z: Error: Cannot find module 'vso-task-lib'

##[Error] 2015-07-30T22:27:10.943Z: at Function.Module._resolveFilename (module.js:336:15)

##[Error] 2015-07-30T22:27:10.943Z: at Function.Module._load (module.js:278:25)

##[Error] 2015-07-30T22:27:10.943Z: at Module.require (module.js:365:17)

##[Error] 2015-07-30T22:27:10.943Z: at require (module.js:384:17)

##[Error] 2015-07-30T22:27:10.943Z: at Object. (/work/tasks/NpmInstall/0.1.2/npminstall.js:2:10)

##[Error] 2015-07-30T22:27:10.943Z: at Module._compile (module.js:460:26)

##[Error] 2015-07-30T22:27:10.943Z: at Object.Module._extensions..js (module.js:478:10)

##[Error] 2015-07-30T22:27:10.943Z: at Module.load (module.js:355:32)

##[Error] 2015-07-30T22:27:10.943Z: at Function.Module._load (module.js:310:12)

##[Error] 2015-07-30T22:27:10.943Z: at Function.Module.runMain (module.js:501:10)

##[Error] 2015-07-30T22:27:10.943Z:

##[Error] 2015-07-30T22:27:11.811Z: Return code: 1

Is this not supported?


Reply to this email directly or view it on GitHubhttps://github.com//issues/44.

@bryanmacfarlane
Copy link
Contributor

Yeah, not supported yet. We pulled it from the config experience until everything does the right thing (set the node module env vars etc...

@bryanmacfarlane bryanmacfarlane self-assigned this Aug 17, 2015
@bryanmacfarlane
Copy link
Contributor

We're cutting this as we're starting on one core-clr agent soon

@joaomoreno
Copy link
Member Author

@bryanmacfarlane so you'll be definitely dropping the Node.JS one?

@bryanmacfarlane
Copy link
Contributor

That's the current plan. The core-CLR one will run on win, osx, Linux.
We considered making the nodejs one the one agent. Long discussions and pros/cons. I like that the js source is right there to tweak/patch, but I like async/await in C# (yeah, coming to TS). We also have other code in VSO that's CS to leverage and standardize on.

If you have feedback or thoughts, we would love to hear it. We haven't started the effort yet.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants