Prismic sm --setup error

Hello, Im using next js and trying to install slice machine but i keep getting an error when running prismic sm --setup I have tried to this on multiple different project but get the same error.

The first time i run the command i get this error:
$ prismic sm --setup
√ Downloading files from server

  • Installing dependencies
    npm ERR! code ERESOLVE
    npm ERR! ERESOLVE unable to resolve dependency tree
    npm ERR!
    npm ERR! While resolving: helloworld-prismic@0.1.0
    npm ERR! Found: react@17.0.1
    npm ERR! node_modules/react
    npm ERR! react@"17.0.1" from the root project
    npm ERR!
    npm ERR! Could not resolve dependency:
    npm ERR! peer react@"^16.13.1" from next-slicezone@0.0.11
    npm ERR! node_modules/next-slicezone
    npm ERR! next-slicezone@"*" from the root project
    npm ERR!
    npm ERR! Fix the upstream dependency conflict, or retry
    npm ERR! this command with --force, or --legacy-peer-deps
    npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
    npm ERR!
    npm ERR! See C:\Users\sidtu\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\sidtu\AppData\Local\npm-cache_logs\2021-01-11T13_58_13_038Z-debug.log

Does anyone know what normally would cause this?

Hello Sid,

Welcome to the Prismic community and thanks for reaching out to us.

Could you please check all the information given in this thread? It has a troubleshooting guide link too.

Let me know if it still doesn't solve the issue.

Thanks,
Priyanka

Hello Sid,

How are you doing?

Have you checked the troubleshooting guide? Are you still getting the error?

I’m eager to receive your feedback.

Thanks,
Priyanka

I am getting this same error and it appears that the react dependency has not been updated to handle the new React 17 release being used by the latest release of next. Is there any update on this issue?

Looks like the issue I was having has to do with the way that npm checks dependencies in newer versions. I was able to get it to work when I switched to node 14.15.4 and npm vs 6.14.10

Hey @sid.turner.ellis, @ryan.huber, sorry for the delay, the issue has been fixed!

You should not experience the issue anymore when running $ prismic sm --setup with NPM 7. If you downgraded to NPM 6 (Node 14) in the meantime, you can get back to 7 again! Just make sure to update next-slicezone to 0.0.13 or higher~ :relaxed:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.