Reputation: 3269
I'm migrating a project to dotnet core *.csproj on VSTS and I can't get a viable agent under Hosted2017 that has PhantomJS. Can anyone advise on this?
Neither the classic 'Hosted' or 'Hosted 2017' has PhantomJS explicitly as a capability.
It seems that it works on hosted by adding the following variable...
PHANTOMJS_BIN: C:\NPM\Modules\PhantomJS.cmd
but this is not correct for Hosted 2017
Upvotes: 1
Views: 672
Reputation: 33728
You can call npm install phantomjs via command line step/task to install phantomjs package.
A simple sample to call phantomjs command:
Npm install (working folder: $(Build.SourcesDirectory);
npm command: install
; arguments: phantomjs
.
Command line (Tool: node_modules\.bin\phantomjs.cmd
; Arguments: --help
;
Working directory: $(Build.SourcesDirectory)
)
You also can add it to the environment temporary (Just in current session). For example:
-p $(Build.SourcesDirectory)\node_modules\.bin
; Script:
Param(
[string]$p
)
$env:Path += ";$p"
phantomjs --help
Upvotes: 3