With the release of Sitecore version 10.2, Sitecore Headless Services also upgraded to version 19.0.0. New steps were added for creating projects without Next.js sample data, saving time by skipping data deletion in initial steps. Let's update.
![](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F1LZ4oAEwmMbz9XNKwslscw%2F48efe002303d648a7c974a7cca8dd8e6%2Fnextjs01.png&w=3840&q=75)
Regarding the version of the jss command
command must be updated to the latest version. The following results were displayed when the version was checked.
github % jss --version
JSS CLI is running in global mode because it was not installed in the local node_modules folder.
19.0.0
You can see that the 19.0.0 command is installed.
Create a Next.js project
First, create a project as before.
jss create nextjs-test nextjs
When the creation is completed, the following message is displayed.
![nextjs01.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F1LZ4oAEwmMbz9XNKwslscw%2F48efe002303d648a7c974a7cca8dd8e6%2Fnextjs01.png&w=3840&q=75)
The explanation is given in the Next.js sample app parameter shown at the end.
* --fetchWith {REST|GraphQL} : Specifies how Sitecore data (layout, dictionary) is fetched. Default is REST.
* --prerender {SSG|SSR} : Specifies the Next.js pre-rendering form for the optional catch-all route. Default is SSG.
* --empty {true|false} : Specifies whether the sample should be empty. Disconnected mode and styleguide components will be removed. Default is false.
The third --empty introduces the point that the sample data will be implemented in a deleted form. So, once again, we will create a project with the following parameters.
jss create nextjs-demo nextjs --empty
In the new directory you created, you can see that the directory under /src/components is empty. Similarly, there is no /data directory at the top level.
![nextjs02.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F6DUqNHG333k5D4Z66DO5zw%2F6f84d288e07d77d6f1e3afd276df226c%2Fnextjs02.png&w=3840&q=75)
To make it work, data and components must be added.
2022-02-22 Postscript: This empty sample is used in the "Change to Sitecore First" section.Summary
When a new version of a headless site is needed, the necessary data can be migrated to this empty template. This feature will be useful in the future.