Setting up the Sitecore Containers template for JSS Next.js apps might hang if using Sitecore.DevEx.Templates version 1.6.1 and earlier and having installed .NET versions later than 3.1. The issue occurs when running the following commands:
dotnet new sitecore.nextjs.gettingstarted -n MyProject
script is hangs on ‘Initializes the JSS project’ step execution.
To resolve the issue, proceed as follows:
- Skip the "Initializes the JSS project" step execution when creating your solution and project through the command
"dotnet new sitecore.nextjs.gettingstarted -n MyProject"
- Run create-jss-project.ps1 manually.
Notes:
- If you run the command for a project the first time, proceed as follows:
- Run the command:
dotnet new sitecore.nextjs.gettingstarted -n MyProject
- Skip the execution of the "Initializes the JSS project" step by typing "n" in response to the following prompt:
Do you want to run this action [Y(yes)|N(no)]?
- Go to the project directory.
- Run the script create-jss-project.ps1 with administrative privileges:
.\create-jss-project.ps1
- Proceed with init.ps1 instructions
- If you have already experienced hanging when setting up a new project, proceed as follows:
- Ensure you have stopped the hanged script execution.
- Go to MyProject/src folder and remove the MyProject folder.
- Go to the project directory.
- Run the script create-jss-project.ps1 with administrative privileges:
.\create-jss-project.ps1
- Proceed with init.ps1 instructions.