You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm encountering an issue while trying to initialize Sanity for a Next.js project. The install-peerdeps command fails with a permission error despite multiple attempts with different approaches. Here are the details:
To Reproduce
Steps to reproduce the behavior:
1.Install a next boilerplate git clone https://github.com/next-enterprise.git cd next-enterprise yarn install --frozen-lockfile
Install sanity over the next project npx sanity@latest init --env --create-project "Next.js Live Preview" --dataset production
Answering CLI questions like this :
Would you like to add configuration files for a Sanity project in this Next.js folder? Yes
Do you want to use TypeScript? Yes
Would you like an embedded Sanity Studio? Yes
What route do you want to use for the Studio? /studio
Select project template to use Clean project with no predefined schema types
Would you like to add the project ID and dataset to your .env file? Yes
Expected behavior
The command should init & install all necessary peer dependencies for sanity inside the existing nextjs project
Describe the bug
I'm encountering an issue while trying to initialize Sanity for a Next.js project. The install-peerdeps command fails with a permission error despite multiple attempts with different approaches. Here are the details:
To Reproduce
Steps to reproduce the behavior:
1.Install a next boilerplate
git clone https://github.com/next-enterprise.git
cd next-enterprise
yarn install --frozen-lockfile
Install sanity over the next project
npx sanity@latest init --env --create-project "Next.js Live Preview" --dataset production
Answering CLI questions like this :
Expected behavior
The command should init & install all necessary peer dependencies for sanity inside the existing nextjs project
Which versions of Sanity are you using?
sanity: command not found
What operating system are you using?
Distributor ID: Ubuntu
Description: Ubuntu 22.04.4 LTS
Release: 22.04
Codename: jammy
Which versions of Node.js / npm are you running?
Run
npm -v && node -v
in the terminal and copy-paste the result here.npm 10.8.1
node v20.15.0
Additional context
This is the last lines of the console output :
The text was updated successfully, but these errors were encountered: