geeklearningio / gl-vsts-tasks-yarn

Yarn Package Manager Visual Studio Team Services Build and Release Management extensions
MIT License
52 stars 18 forks source link

install fails with 1.x ( TypeError: Cannot read property 'replace' of null ) #22

Closed jrr closed 6 years ago

jrr commented 6 years ago

I tried updating our yarn task from 0.* to 1.* today, and yarn fails with TypeError: Cannot read property 'replace' of null. Logs below:

broken 1.x:

##[debug]Evaluating condition for step: 'Install Packages'
##[debug]Evaluating: succeeded()
##[debug]Evaluating succeeded:
##[debug]=> (Boolean) True
##[debug]Expanded: True
##[debug]Result: True
##[section]Starting: Install Packages
==============================================================================
Task         : Yarn task
Description  : Executes Yarn
Version      : 1.0.999
Author       : Geek Learning
Help         : [More Information](https://github.com/geeklearningio/gl-vsts-tasks-yarn/wiki/Yarn) (Version 1.0.999)
==============================================================================
##[debug]agent.workFolder=d:\a
##[debug]loading inputs and endpoints
##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
##[debug]loading INPUT_CUSTOMREGISTRY
##[debug]loading INPUT_PRODUCTIONMODE
##[debug]loading INPUT_PROJECTDIRECTORY
##[debug]loaded 6
##[debug]which 'yarn'
##[debug]not found
##[debug]Arguments=null
##[debug]ProjectDirectory=d:\a\1\s
##[debug]customRegistry=useNpmrc
##[debug]customFeed=null
##[debug]customEndpoint=null
##[debug]AGENT_WORKFOLDER=d:\a
##[debug]d:\a\yarn
##[debug]["dist"]
##[debug]d:\a\yarn\dist\bin\yarn.cmd
##[debug]Build.BuildId=10081
##[debug]Agent.BuildDirectory=d:\a\1
##[debug]testing directory 'd:\a\1\npm'
##[debug]testing directory 'd:\a\1'
##[debug]mkdir 'd:\a\1\npm'
##[debug]Build.BuildId=10081
##[debug]Agent.BuildDirectory=d:\a\1
##[debug]Using registries in .npmrc
TypeError: Cannot read property 'replace' of null
##[debug]task result: Failed
##[error]TypeError: Cannot read property 'replace' of null
##[debug]Processed: ##vso[task.issue type=error;]TypeError: Cannot read property 'replace' of null
##[debug]Processed: ##vso[task.complete result=Failed;]TypeError: Cannot read property 'replace' of null
##[debug]Agent.BuildDirectory=d:\a\1
##[debug]rm -rf d:\a\1\npm
##[debug]removing directory
##[section]Finishing: Install Packages

working 0.x

##[debug]Evaluating condition for step: 'Install Packages'
##[debug]Evaluating: succeeded()
##[debug]Evaluating succeeded:
##[debug]=> (Boolean) True
##[debug]Expanded: True
##[debug]Result: True
##[section]Starting: Install Packages
==============================================================================
Task         : Yarn task
Description  : Executes Yarn
Version      : 0.7.1001
Author       : Geek Learning
Help         : [More Information](https://github.com/geeklearningio/gl-vsts-tasks-yarn/wiki/Yarn) (Version 0.7.1001)
==============================================================================
##[debug]agent.workFolder=d:\a
##[debug]loading inputs and endpoints
##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
##[debug]loading INPUT_PRODUCTIONMODE
##[debug]loading INPUT_PROJECTDIRECTORY
##[debug]loaded 5
##[debug]Absolute path for pathSegments: C:\LR\mms\Services\Mms\Provisioner\TaskAgent\agents\2.120.1\externals\git\cmd/yarn = C:\LR\mms\Services\Mms\Provisioner\TaskAgent\agents\2.120.1\externals\git\cmd\yarn
##[debug]Absolute path for pathSegments: C:\ProgramData\Oracle\Java\javapath/yarn = C:\ProgramData\Oracle\Java\javapath\yarn
##[debug]Absolute path for pathSegments: C:\Windows\system32/yarn = C:\Windows\system32\yarn
##[debug]Absolute path for pathSegments: C:\Windows/yarn = C:\Windows\yarn
##[debug]Absolute path for pathSegments: C:\Windows\System32\Wbem/yarn = C:\Windows\System32\Wbem\yarn
##[debug]Absolute path for pathSegments: C:\Windows\System32\WindowsPowerShell\v1.0\/yarn = C:\Windows\System32\WindowsPowerShell\v1.0\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\/yarn = C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\yarn
##[debug]Absolute path for pathSegments: C:\Program Files\Microsoft SQL Server\100\Tools\Binn\/yarn = C:\Program Files\Microsoft SQL Server\100\Tools\Binn\yarn
##[debug]Absolute path for pathSegments: C:\Program Files\Microsoft SQL Server\100\DTS\Binn\/yarn = C:\Program Files\Microsoft SQL Server\100\DTS\Binn\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\/yarn = C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\yarn
##[debug]Absolute path for pathSegments: C:\Program Files\Microsoft SQL Server\110\Tools\Binn\/yarn = C:\Program Files\Microsoft SQL Server\110\Tools\Binn\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.4\/yarn = C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.4\yarn
##[debug]Absolute path for pathSegments: C:\Users\VssAdministrator\.dnx\bin/yarn = C:\Users\VssAdministrator\.dnx\bin\yarn
##[debug]Absolute path for pathSegments: C:\Program Files\Microsoft DNX\Dnvm\/yarn = C:\Program Files\Microsoft DNX\Dnvm\yarn
##[debug]Absolute path for pathSegments: C:\Program Files\Microsoft SQL Server\120\Tools\Binn\/yarn = C:\Program Files\Microsoft SQL Server\120\Tools\Binn\yarn
##[debug]Absolute path for pathSegments: C:\Program Files\Microsoft SQL Server\130\Tools\Binn\/yarn = C:\Program Files\Microsoft SQL Server\130\Tools\Binn\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Microsoft Emulator Manager\1.0\/yarn = C:\Program Files (x86)\Microsoft Emulator Manager\1.0\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\/yarn = C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\wbin/yarn = C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\wbin\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\/yarn = C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\yarn
##[debug]Absolute path for pathSegments: C:\Program Files\Microsoft\Web Platform Installer\/yarn = C:\Program Files\Microsoft\Web Platform Installer\yarn
##[debug]Absolute path for pathSegments: C:\Program Files\Git LFS/yarn = C:\Program Files\Git LFS\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\GtkSharp\2.12\bin/yarn = C:\Program Files (x86)\GtkSharp\2.12\bin\yarn
##[debug]Absolute path for pathSegments: C:\Program Files\Git\cmd/yarn = C:\Program Files\Git\cmd\yarn
##[debug]Absolute path for pathSegments: C:\Program Files\Git\bin/yarn = C:\Program Files\Git\bin\yarn
##[debug]Absolute path for pathSegments: C:\Program Files\Git\usr\bin/yarn = C:\Program Files\Git\usr\bin\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\/yarn = C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\/yarn = C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies\/yarn = C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\/yarn = C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\/yarn = C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\/yarn = C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies\/yarn = C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\/yarn = C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\yarn
##[debug]Absolute path for pathSegments: C:\Python27/yarn = C:\Python27\yarn
##[debug]Absolute path for pathSegments: C:\Program Files\dotnet\/yarn = C:\Program Files\dotnet\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\CMake\bin/yarn = C:\Program Files (x86)\CMake\bin\yarn
##[debug]Absolute path for pathSegments: C:\NPM\Modules/yarn = C:\NPM\Modules\yarn
##[debug]Absolute path for pathSegments: C:\Program Files\nodejs\/yarn = C:\Program Files\nodejs\yarn
##[debug]Absolute path for pathSegments: C:\NPM\Modules/yarn = C:\NPM\Modules\yarn
##[debug]Absolute path for pathSegments: C:\cordova/yarn = C:\cordova\yarn
##[debug]Absolute path for pathSegments: C:\java\ant\apache-ant-1.9.7\bin/yarn = C:\java\ant\apache-ant-1.9.7\bin\yarn
##[debug]Absolute path for pathSegments: C:\NPM\Modules/yarn = C:\NPM\Modules\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\/yarn = C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\/yarn = C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\yarn
##[debug]Absolute path for pathSegments: C:\cf-cli_6.25.0_winx64\/yarn = C:\cf-cli_6.25.0_winx64\yarn
##[debug]Absolute path for pathSegments: C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code/yarn = C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code\yarn
##[debug]Absolute path for pathSegments: C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager/yarn = C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\/yarn = C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\yarn
##[debug]Absolute path for pathSegments: C:\LR\mms\Services\Mms\Provisioner\TaskAgent\agents\2.120.1\bin/yarn = C:\LR\mms\Services\Mms\Provisioner\TaskAgent\agents\2.120.1\bin\yarn
##[debug]Absolute path for pathSegments: C:\LR\mms\Services\Mms\Provisioner\TaskAgent\agents\2.120.1\bin/yarn = C:\LR\mms\Services\Mms\Provisioner\TaskAgent\agents\2.120.1\bin\yarn
##[debug]yarn=null
##[debug]Arguments=null
##[debug]ProjectDirectory=d:\a\1\s
##[debug]AGENT_WORKFOLDER=d:\a
##[debug]d:\a\yarn
##[debug]["dist"]
##[debug]d:\a\yarn\dist\bin\yarn.cmd
##[debug]ProductionMode=false
##[debug]exec tool: d:\a\yarn\dist\bin\yarn.cmd
##[debug]Arguments:
[command]d:\a\yarn\dist\bin\yarn.cmd
yarn install v0.27.5
[1/4] Resolving packages...
[2/4] Fetching packages...
warning fsevents@1.1.2: The platform "win32" is incompatible with this module.
info "fsevents@1.1.2" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 123.98s.
##[debug]rc:0
##[debug]success:true
##[debug]task result: Succeeded
##[debug]Processed: ##vso[task.complete result=Succeeded;]Yarn executed successfully
##[section]Finishing: Install Packages
sandorfr commented 6 years ago

Sorry to hear that and thanks for reporting it. Can you switch back to 0.x while I figure this out?

jrr commented 6 years ago

Yep! Let me know if there's anything I can do to help you investigate. It occurs on hosted agents and also a build agent I can RDP to.

sandorfr commented 6 years ago

The fix should be available now 🎉

jrr commented 6 years ago

That was fast, thanks!