Errors in a brand-new machine for Sitecore MVP Site

In a fresh windows 10 machine tried to install Sitecore MVP site by running .\Start-Environment.ps1 -pull and I received a series of errors . So, in a gist, here are the download urls for the pre-requisites:

Docker for Windows

 .net sdk from here 

 install .net core 3.1 from here

.NET SDK installation status:



Restart PowerShell window. Both docker and dotnet commands must be recognised after sdk and docker windows installation:


If you run .\Start-Environment.ps1 -pull without installing .net core 3.1, you will encounter .net core 3.1 pre-requisite error (listed below). So,  install .net core 3.1 from here. Remember to switch to windows container before you run .\Start-Environment.ps1

Docker login Error:

Received this error randomly although I was logged in to Docker desktop. This error could possibly occur if you are on a new machine or upgraded the Docker desktop to new version:

______________________________________________________________________

2 errors occurred:
        * Status: pull access denied for mvp-solution, repository does not exist or may require 'docker login': denied: requested access to the resource is denied, Code: 1
        * Status: pull access denied for mvp-solution, repository does not exist or may require 'docker login': denied: requested access to the resource is denied, Code: 1
________________________________________________________________________

Based on the above error, logged out and logged back into both Docker Desktop and Docker website then retried  Start-Environment.ps1 and didn't get any errors this time. 

Docker Error:

docker : The term 'docker' is not recognized as the name of a cmdlet, function, script file, or operable program.

Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

At C:\mvp-site\Start-Environment.ps1:73 char:5

+     docker images --format "{{.Repository}}:{{.Tag}}" | Select-String ...

+     ~~~~~~

    + CategoryInfo          : ObjectNotFound: (docker:String) [], CommandNotFoundException

    + FullyQualifiedErrorId : CommandNotFoundException


Dotnet Error:

dotnet : The term 'dotnet' is not recognized as the name of a cmdlet, function, script file, or operable program.

Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

At C:\mvp-site\Start-Environment.ps1:94 char:1

+ dotnet tool restore

+ ~~~~~~

    + CategoryInfo          : ObjectNotFound: (dotnet:String) [], CommandNotFoundException

    + FullyQualifiedErrorId : CommandNotFoundException


& : The term 'docker-compose' is not recognized as the name of a cmdlet, function, script file, or operable program.

Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

At C:\mvp-site\docker\tools\Scripts\Functions-Docker.ps1:17 char:10

+        & "docker-compose" $fileArgs "build" "-m" "$MemoryLimit"

+          ~~~~~~~~~~~~~~~~

    + CategoryInfo          : ObjectNotFound: (docker-compose:String) [], CommandNotFoundException

    + FullyQualifiedErrorId : CommandNotFoundException


& : The term 'docker-compose' is not recognized as the name of a cmdlet, function, script file, or operable program.

Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

At C:\mvp-site\docker\tools\Scripts\Functions-Docker.ps1:19 char:7

+     & "docker-compose" $fileArgs "up" "-d"

+       ~~~~~~~~~~~~~~~~

    + CategoryInfo          : ObjectNotFound: (docker-compose:String) [], CommandNotFoundException

    + FullyQualifiedErrorId : CommandNotFoundException


Waiting for CM to become available...

The property 'StatusCode' cannot be found on this object. Verify that the property exists.

At C:\mvp-site\docker\tools\Scripts\Functions-SitecoreCLI.ps1:23 char:17

+             if ($_.Exception.Response.StatusCode.value__ -ne "404") {

+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [], PropertyNotFoundException

    + FullyQualifiedErrorId : PropertyNotFoundStrict


The variable '$status' cannot be retrieved because it has not been set.

At C:\mvp-site\docker\tools\Scripts\Functions-SitecoreCLI.ps1:27 char:14

+     } while ($status.status -ne "enabled" -and $startTime.AddSeconds( ...

+              ~~~~~~~

    + CategoryInfo          : InvalidOperation: (status:String) [], RuntimeException

    + FullyQualifiedErrorId : VariableIsUndefined


The variable '$status' cannot be retrieved because it has not been set.

At C:\mvp-site\docker\tools\Scripts\Functions-SitecoreCLI.ps1:28 char:14

+     if (-not $status.status -eq "enabled") {

+              ~~~~~~~

    + CategoryInfo          : InvalidOperation: (status:String) [], RuntimeException

    + FullyQualifiedErrorId : VariableIsUndefined


dotnet : The term 'dotnet' is not recognized as the name of a cmdlet, function, script file, or operable program.

Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

At C:\mvp-site\docker\tools\Scripts\Functions-SitecoreCLI.ps1:33 char:5

+     dotnet sitecore login --cm $CmHost --auth $IdHost --allow-write t ...

+     ~~~~~~

    + CategoryInfo          : ObjectNotFound: (dotnet:String) [], CommandNotFoundException

    + FullyQualifiedErrorId : CommandNotFoundException


Pushing latest items to Sitecore...

dotnet : The term 'dotnet' is not recognized as the name of a cmdlet, function, script file, or operable program.

Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

At C:\mvp-site\docker\tools\Scripts\Functions-SitecoreCLI.ps1:40 char:5

+     dotnet sitecore ser push

+     ~~~~~~

    + CategoryInfo          : ObjectNotFound: (dotnet:String) [], CommandNotFoundException

    + FullyQualifiedErrorId : CommandNotFoundException


dotnet : The term 'dotnet' is not recognized as the name of a cmdlet, function, script file, or operable program.

Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

At C:\mvp-site\docker\tools\Scripts\Functions-SitecoreCLI.ps1:45 char:5

+     dotnet sitecore publish

+     ~~~~~~

    + CategoryInfo          : ObjectNotFound: (dotnet:String) [], CommandNotFoundException

    + FullyQualifiedErrorId : CommandNotFoundException 




Dotnet Core 3.1 Error:

The property 'StatusCode' cannot be found on this object. Verify that the property exists.

At C:\MVP-Site\docker\tools\Scripts\Functions-SitecoreCLI.ps1:23 char:17

+             if ($_.Exception.Response.StatusCode.value__ -ne "404") {

+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [], PropertyNotFoundException

    + FullyQualifiedErrorId : PropertyNotFoundStrict


The variable '$status' cannot be retrieved because it has not been set.

At C:\MVP-Site\docker\tools\Scripts\Functions-SitecoreCLI.ps1:27 char:14

+     } while ($status.status -ne "enabled" -and $startTime.AddSeconds( ...

+              ~~~~~~~

    + CategoryInfo          : InvalidOperation: (status:String) [], RuntimeException

    + FullyQualifiedErrorId : VariableIsUndefined


The variable '$status' cannot be retrieved because it has not been set.

At C:\MVP-Site\docker\tools\Scripts\Functions-SitecoreCLI.ps1:28 char:14

+     if (-not $status.status -eq "enabled") {

+              ~~~~~~~

    + CategoryInfo          : InvalidOperation: (status:String) [], RuntimeException

    + FullyQualifiedErrorId : VariableIsUndefined


It was not possible to find any compatible framework version

The framework 'Microsoft.NETCore.App', version '3.1.0' (x64) was not found.

  - The following frameworks were found:

      6.0.4 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]


You can resolve the problem by installing the specified framework and/or SDK.


The specified framework can be found at:

  - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=3.1.0&arch=x64&rid=win10-x64

Push-Items : Unable to log into Sitecore, did the Sitecore environment start correctly? See logs above.

At C:\MVP-Site\Start-Environment.ps1:98 char:1

+ Push-Items -IdHost "https://id.$($HostDomain)" -CmHost "https://cm.$( ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException

    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Push-Items


Pushing latest items to Sitecore...

It was not possible to find any compatible framework version

The framework 'Microsoft.NETCore.App', version '3.1.0' (x64) was not found.

  - The following frameworks were found:

      6.0.4 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]


You can resolve the problem by installing the specified framework and/or SDK.


The specified framework can be found at:

  - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=3.1.0&arch=x64&rid=win10-x64

Push-Items : Serialization push failed, see errors above.

At C:\MVP-Site\Start-Environment.ps1:98 char:1

+ Push-Items -IdHost "https://id.$($HostDomain)" -CmHost "https://cm.$( ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException

    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Push-Items


It was not possible to find any compatible framework version

The framework 'Microsoft.NETCore.App', version '3.1.0' (x64) was not found.

  - The following frameworks were found:

      6.0.4 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]


You can resolve the problem by installing the specified framework and/or SDK.


The specified framework can be found at:

  - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=3.1.0&arch=x64&rid=win10-x64

Push-Items : Item publish failed, see errors above.

At C:\MVP-Site\Start-Environment.ps1:98 char:1

+ Push-Items -IdHost "https://id.$($HostDomain)" -CmHost "https://cm.$( ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException

    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Push-Items

Comments