I'm trying to execute the command to start the project in Next.JS, which already exists, but it's saying that the dependency package below no longer exists:
npx @slicemachine/init@latest --repository spacetravelling-desafio2
Slice Machine → Init command started
We collect telemetry data to improve user experience.
Learn more: https://prismic.dev/slice-machine/telemetry
Detected framework universal (no framework) and package manager yarn
Began core dependencies installation with yarn ... (running in background)
Logged in as firstname.lastname@example.org
Selected repository spacetravelling-desafio2 (flag repository used)
| Finishing core dependencies installation with yarn ...
→ info Visit yarn add | Yarn for documentation about this command.
Command failed with exit code 1: yarn add -D slice-machine-ui@latest @slicemachine/adapter-universal@latest --color
warning ..\package.json: No license field
warning slice-machine-ui > @prismicio/editor-fields > @email@example.com: Package renamed to @floating-ui/react
error An unexpected error occurred: "https://registry.yarnpkg.com/@slicemachine%2Fadapter-universal: Not found".
Dependency installation failed, try again with:
$ node C:\Users\user\AppData\Local\npm-cache_npx\b6923b01b288b666\node_modules@slicemachine\init\bin\slicemachine-init.js --repository spacetravelling-desafio2
I'm getting an error at the same part.
It's worth mentioning that I could only log in via the terminal if I did it super quickly. If it took me longer than half a second, it failed.
Did you manage to come up with a solution?
I haven't been able to find one yet here.
Hi, @giuzntt. Welcome to the Prismic forum. Thanks for the detailed information you have provided about the error.
You mentioned you are using Next.js, and I can see that the
@slicemachine/init package hasn't detected a framework. Have you already created your Next.js app? If so, could you provide a link to your code?
Hi, @david14. Welcome to the Prismic forum. Thanks for reaching out to let us know you’re experiencing a similar error. Can you confirm what framework you are using?
Here is the link to my project on GitHub Project, I have already created the Next.JS project. I was checking about the error.
Looks like the floatingUI package has been renamed, we should fix something in Prismic.
Link package in npm, Floating UI Renamed](@floating-ui/react-dom-interactions - npm
Thanks, @giuzntt, for providing your code. It looks like you’re using some older versions of Next.js, React, and our packages which need to be updated to be able to use the latest version of Slice Machine.
Can you update to the latest versions and let me know if the issue still occurs?
I figured out my issue based on your response to @giuzntt . I was using next@canary, their open beta branch. Once I moved to @latest, it worked fine.
What command did you put in the terminal to resolve this error?
I say to update Next.js
I tested it in another project and the error remains the same. Can you test on your side if the same error occurs with an existing project?
If you want you can clone my project https://github.com/Giuzntt/desafio-spacetravelling-rocketseat.
Hey, @david14. I'm glad to hear your issue was solved.
Hi, @giuzntt. I ran the following commands to update your project's packages.
npm update --force
npm install next@latest --force
npm install @prismicio/react@latest --force
npm install react-dom@latest --force
npm install react@latest --force
npm install @prismicio/next@latest --force
npx @slicemachine/init@latest should detect Next.js and install our Next.js Slice Machine adapter.
If you're still having issues, have you tried our Yarn workaround? Delete your
yarn.lock file and then run the
npx command again:
npx @slicemachine/init@latest. Then try installing your modules using
You should then be able to run your dev server using
yarn dev and Slice Machine using
npm run slicemachine.
This isn't working with Next14
I have the same issue, tried to install
npx @slicemachine/init@latest but get the
npm ERR! code E404 npm ERR! 404 Not Found - GET https://registry.npmjs.org/@slicemachine%2fadapter-universal - Not found npm ERR! 404 npm ERR! 404 '@slicemachine/adapter-universal@latest' is not in this registry. npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, http url, or git url.
error. I'm on the last version of NextJS.
I resolved the issue by downgrading to Next 13, as it appears that Slicer doesn't function correctly in Next 14.
Hey @justin.berghahn & @barrymichaeldoyle ,
We've now updated Slice Machine and this should work with Next 14
Yes it's ok here with Next 14