projectkudu/KuduScript

Deployment Issue with TypeScript compilation

Closed this issue · 1 comments

I'm getting the following error when trying to deploy a recent commit to an Azure Web App.

wwwroot\lib\moment\typing-tests\moment-tests.ts(131,14): error TS2345: Build: Argument of type '"date"' is not assignable to parameter of type '"year" | "years" | "y" | "quarter" | "quarters" | "Q" | "month" | "months" | "M" | "week" | "week...'. [D:\home\site\repository\src\MyProject.Web\MyProject.Web.xproj]
wwwroot\lib\moment\typing-tests\moment-tests.ts(318,5): error TS2345: Build: Argument of type '{ months: string[]; monthsShort: string[]; weekdays: string[]; weekdaysShort: string[]; weekdaysM...' is not assignable to parameter of type 'MomentLanguage'. [D:\home\site\repository\src\MyProject.Web\MyProject.Web.xproj]
Failed exitCode=1, command="D:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" "D:\home\site\repository\MyProject.sln" /nologo /verbosity:m /p:AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release;UseSharedCompilation=false
An error has occurred during web site deployment.
\r\nD:\Program Files (x86)\SiteExtensions\Kudu\59.51122.2559\bin\Scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd"

The same codebase was successfully deployed to another Web App but when trying to deploy to our production app we get the error.

Is it possible there might be a configuration setting? I have WEBSITE_NODE_DEFAULT_VERSION=4.6.0 and WEBSITE_NPM_DEFAULT_VERSION=3.10.3 set on both web apps.

changing moment.js package to 2.15.2 fixed this. still not sure why it wasn't an issue in the other environment.