Build Failing on NPM Install - Typings

与世无争的帅哥 提交于 2019-12-11 19:57:43

问题


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).

来源:https://stackoverflow.com/questions/50687945/build-failing-on-npm-install-typings

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!