Closed wongprom closed 11 months ago
v14.16.1
=> to at least v16.20.2
⚠️ Not in the frontend folder (we will embed Sanity Studio in our nextjs)
$ cd ..
out one step from nextjs project$ npm create sanity@latest
Need to install the following packages:
create-sanity@3.16.4
Ok to proceed? (y) y
Error: Failed to communicate with the Sanity API:
Unauthorized - Session not found. You may need to login again with sanity login.
For more information, see https://docs.sanity.io/help/cli-errors.
at getOrCreateProject (~/.npm/_npx/64b24/node_modules/@sanity/cli/lib/_chunks/cli-
129.js:111:11)
at async initSanity (~/.npm/_npx/789/node_modules/@sanity/cli/lib/_chunks/cli-
119.js:18411:415)
$ sanity login
zsh: command not found: sanity
$ npm install --global sanity@latest
$ npm create sanity@latest
Error: Failed to communicate with the Sanity API:
Unauthorized - Session not found. You may need to login again with sanity login.
$ sanity login
❗️use same login type as you use when login to Sanity
ewewfer
Login type GitHub
Login successful
$ npm create sanity@latest
Fetching existing projects
? Select project to use Create new project
? Your project name: Sanity For testing-1
? Use the default dataset configuration? Yes
✅ Creating dataset
? Project output path: /..../react/next/sanity-for-testing-1
? Select project template Clean project with no predefined schemas
? Do you want to use TypeScript? Yes
✅ Bootstrapping files from template
✅ Resolving latest module versions
✅ Creating default project files
? Package manager to use for installing dependencies? npm
Success 🎉
$ ls
campout | connect-next-with-gql | git-test |
---|---|---|
hulu-2 | testing-1 | sanity-for-testing-1 |
testing-1 is the name of my nextjs project. sanity-for-testing-1 is the Sanity Studio folder.
$ cd sanity-for-testing-1
$ npm run dev
Checking configuration files...
✅ Sanity Studio using vite@4.4.9 ready in 1567ms and running at http://localhost:3333/
DONE 🎉
Is your feature request related to a problem? Please describe.
Helpful links
Success criteria
/admin
for Sanity Studio