Slice machine initialisation error for Prismic + Next.js Multi-Lang Starter

I followed the steps on GitHub - prismicio-community/nextjs-starter-prismic-multi-language: Multi-language project with Next.js & Prismic
npx @slicemachine/init ends up with an error uploading documents

You're about to configure Slicemachine... Press ctrl + C to cancel
:heavy_check_mark: Logged in as ******
:heavy_check_mark: Next.js detected
? Connect a Prismic Repository or create a new one Use NotYour.Business "notyourbusiness.prismic.io"
? Your repository already contains Slices. Do you want to continue pushing your local Slices? Yes
:heavy_check_mark: Pushing existing Slice models to your repository
? Your repository already contains Custom Types. Do you want to continue pushing your local Custom Types? Yes
:heavy_check_mark: Pushing existing custom types to your repository
:heavy_multiplication_x: Pushing existing documents to your repository
Error! Sending documents failed, please try again. If the problem persists, contact us.
Error! Full error: ERR_BAD_REQUEST - Request failed with status code 401

Is there any log file somewhere ? Any idea about the potential problem ?

repo: notyourbusiness
node v16.14.2
"dependencies": {
"@prismicio/client": "^6.6.1",
"@prismicio/helpers": "^2.3.2",
"@prismicio/next": "^0.1.3",
"@prismicio/react": "^2.4.4",
"@prismicio/slice-simulator-react": "^0.2.2",
"clsx": "^1.2.1",
"flag-icons": "^6.6.4",
"next": "12.2.4",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"@prismicio/types": "^0.2.0",
"@tailwindcss/aspect-ratio": "^0.4.0",
"autoprefixer": "^10.4.8",
"concurrently": "^7.3.0",
"eslint": "8.21.0",
"eslint-config-next": "12.2.4",
"postcss": "^8.4.14",
"prettier": "^2.7.1",
"prettier-plugin-tailwindcss": "^0.1.13",
"prismic-ts-codegen": "^0.1.1",
"slice-machine-ui": "^0.4.2",
"tailwindcss": "^3.1.8"
}

Hi @cptflammin

Thanks for reaching out.

Have been able to fix this issue, please let me know if there is a need to troubleshoot this issue.

Working thanks !

1 Like

Thanks for letting us know; it would be really appreciated if you explain what the issue was for the benefit of the community.

Hi @cptflammin , can you explain how did you solve the problem ? i have the same issue...with nuxt

The problem solved by itself, however I get now the same problem with
prismicio-community/nextjs-starter-prismic-multi-page

So honestly no clue what is going on...

You're about to configure Slicemachine... Press ctrl + C to cancel
:heavy_check_mark: Logged in as *****
:heavy_check_mark: Next.js detected
? Connect a Prismic Repository or create a new one Create a new Repository
:information_source: The name acts as a domain/endpoint for your content repo and should be completely unique.
? Name your Prismic repository https://tmultipage.prismic.io
:heavy_multiplication_x: Error creating repository tmultipage
Error! Request failed with status code 401
Error! We failed to create you new prismic repository
Run npx @slicemachine/init again!

Same issue the other way round (created online) then download starter. Strange.

npx degit prismicio-community/nextjs-starter-prismic-multi-page tmultipage && cd tmultipage && npx @slicemachine/init --repository tmultipage

cloned prismicio-community/nextjs-starter-prismic-multi-page#HEAD to tmultipage
removed: .github/
You're about to configure Slicemachine... Press ctrl + C to cancel
:heavy_check_mark: Logged in as ****
:heavy_check_mark: Next.js detected
:heavy_check_mark: Pushing existing Slice models to your repository
:heavy_check_mark: Pushing existing custom types to your repository
:heavy_multiplication_x: Pushing existing documents to your repository
Error! Sending documents failed, please try again. If the problem persists, contact us.
Error! Full error: ERR_BAD_REQUEST - Request failed with status code 401

Ok, got it. Running again

prismic login

solved the issue. What's weird is that repositories were listed correctly. Anyway

Thanks @cptflammin for letting us know.