0

I suddenly have an issue where our build server is now failing on a web build. Our first step after getting sources is to run a PowerShell script that does a few things, including running npm install (so we do not keep all the packages in source control).

The process gets to what should be the last item in the list, and then throws

error EISDIR: illegal operation on a directory, open 'K:\_work\4\s\Web\typings'

No changes have been made to any of the package config files. I have tried several different versions of Node.js, but still get this error. I have also tried installing the typings version we are using (1.3.1) globally on the server, and that does not work either.

The code being run by PowerShell:

Write-Host "START: running npm install"

[string] $pkg_dir = @(Join-Path $Env:BUILD_SOURCESDIRECTORY "\Web") 

&npm --prefix $pkg_dir install $pkg_dir --loglevel "error"

Write-Host "FINISHED: running npm install"

Given this, I have no idea how it would even try to do anything with the offending directory, or where I would put any directory checking code (as mentioned in the comments).

Dave Johnson
  • 825
  • 16
  • 27
  • hmmm https://stackoverflow.com/a/20417119/1994251 ? – infamoustrey Jun 04 '18 at 20:00
  • Perhaps worth noting, if I use an older version of Node (which I may have to use, based on the documentation) I get past this but hit a Grunt error later that SO says is caused by using an old version of Node. – Dave Johnson Jun 04 '18 at 20:24
  • Have you tried to manually remote to the build agent and run the powershell instead of through TFS build? This will narrow down if the issue is related to TFS side or your environment on the build server. – PatrickLu-MSFT Jun 05 '18 at 10:07
  • @PatrickLu-MSFT Thanks for the follow up. There were a couple issues, both caused by updates to Grunt (https://stackoverflow.com/questions/50688988/update-to-grunt-causes-use-of-const-in-strict-mode-error) which I was able to solve by specifying a specific version of Grunt. I do need to get our packages updated so we can update Grunt and Node, but for now it works. – Dave Johnson Jul 03 '18 at 14:32
  • 1
    Possible duplicate of [Update to Grunt causes "Use of const in strict mode" error](https://stackoverflow.com/questions/50688988/update-to-grunt-causes-use-of-const-in-strict-mode-error) – Dave Johnson Jul 03 '18 at 14:32

0 Answers0