You will need to include the knockout.js in storecommmerce.pos project
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\CustomizationPackage.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Remove="devDependencies\**" />
<EmbeddedResource Remove="devDependencies\**" />
<TypeScriptCompile Remove="devDependencies\**" />
<PackageReference Include="knockoutjs" Version="3.5.*" />
</ItemGroup>
<ItemGroup>
<None Include="Libraries\applicationinsights-web.js" />
<None Include="Libraries\applicationinsights-web.min.js" />
<None Include="Libraries\knockout.js" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Dynamics.Commerce.Sdk.Pos" Version="$(CommerceSdkPackagesVersion)" />
<PackageReference Include="Microsoft.TypeScript.MSBuild" Version="4.0.*" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CommerceRuntime\XX.StoreCommerce.CommerceRuntime.csproj" />
</ItemGroup>
<Target Name="ContentIncludeKnockoutLibrary" BeforeTargets="AssignTargetPaths" DependsOnTargets="RunResolvePackageDependencies">
<PropertyGroup>
<KnockoutLibraryFilePath Condition="'%(PackageDefinitions.Name)' == 'knockoutjs'">%(PackageDefinitions.ResolvedPath)\Content\Scripts\knockout-%(PackageDefinitions.Version).js</KnockoutLibraryFilePath>
<KnockoutjsFile>Libraries/knockout.js</KnockoutjsFile>
</PropertyGroup>
<Copy SourceFiles="$(KnockoutLibraryFilePath)" DestinationFiles="$(KnockoutjsFile)" SkipUnchangedFiles="true" />
<!-- Necessary for CPOS -->
<ItemGroup>
<Content Include="$(KnockoutjsFile)"></Content>
<Content Include="Libraries/applicationinsights-web.js"></Content>
<Content Include="Libraries/applicationinsights-web.min.js"></Content>
</ItemGroup>
</Target>
</Project>
And tsconfig should look like this
{
"extends": "./devDependencies/pos-tsconfig-base.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"knockout": [ "Libraries/knockout" ],
"applicationinsights-web": [ "Libraries/applicationinsights-web" ]
},
"noImplicitAny": false,
"noUnusedLocals": false,
"noUnusedParameters": false
}
}
I am alos using the app insights but if you arent using it then remove