New Prismic Libraries Won't Install

Hi. I'm new to Prismic and was trying to set it up in my project but ran into an error that I believe was introduced in updates pushed out yesterday (I say this because the documentation was updated yesterday and now references some things/versions I didn't have when I tried to set up things previously in the week).

When trying to run "npx @slicemachine/init" to get the new files I get an error that the packages can't be resolved. I've tried this at home and at the office so I'm confident it's not a firewall issue.

I also tried to just directly install the packages in question (outside of slicemachine/init) and got the same result.

Has anyone else come across this and perhaps knows a fix?

Here's the full error:

Error: Command failed: npm install --save @prismicio/react @prismicio/client @prismicio/slice-simulator-react @prismicio/helpers
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @prismicio/react@2.1.1
npm ERR! Found: @prismicio/client@5.1.1
npm ERR! node_modules/@prismicio/client
npm ERR!   @prismicio/client@"^5.1.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peerOptional @prismicio/client@"^6.0.0" from @prismicio/react@2.1.1
npm ERR! node_modules/@prismicio/react
npm ERR!   @prismicio/react@"*" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: @prismicio/client@6.3.0
npm ERR! node_modules/@prismicio/client
npm ERR!   peerOptional @prismicio/client@"^6.0.0" from @prismicio/react@2.1.1
npm ERR!   node_modules/@prismicio/react
npm ERR!     @prismicio/react@"*" 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 /Users/dhayes/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/dhayes/.npm/_logs/2022-03-09T14_29_07_061Z-debug.log

    at ChildProcess.exithandler (node:child_process:397:12)
    at ChildProcess.emit (node:events:390:28)
    at maybeClose (node:internal/child_process:1064:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5) {
  killed: false,
  code: 1,
  signal: null,
  cmd: 'npm install --save @prismicio/react @prismicio/client @prismicio/slice-simulator-react @prismicio/helpers',
  stdout: '',
  stderr: 'npm ERR! code ERESOLVE\n' +
    'npm ERR! ERESOLVE could not resolve\n' +
    'npm ERR! \n' +
    'npm ERR! While resolving: @prismicio/react@2.1.1\n' +
    'npm ERR! Found: @prismicio/client@5.1.1\n' +
    'npm ERR! node_modules/@prismicio/client\n' +
    'npm ERR!   @prismicio/client@"^5.1.1" from the root project\n' +
    'npm ERR! \n' +
    'npm ERR! Could not resolve dependency:\n' +
    'npm ERR! peerOptional @prismicio/client@"^6.0.0" from @prismicio/react@2.1.1\n' +
    'npm ERR! node_modules/@prismicio/react\n' +
    'npm ERR!   @prismicio/react@"*" from the root project\n' +
    'npm ERR! \n' +
    'npm ERR! Conflicting peer dependency: @prismicio/client@6.3.0\n' +
    'npm ERR! node_modules/@prismicio/client\n' +
    'npm ERR!   peerOptional @prismicio/client@"^6.0.0" from @prismicio/react@2.1.1\n' +
    'npm ERR!   node_modules/@prismicio/react\n' +
    'npm ERR!     @prismicio/react@"*" from the root project\n' +
    'npm ERR! \n' +
    'npm ERR! Fix the upstream dependency conflict, or retry\n' +
    'npm ERR! this command with --force, or --legacy-peer-deps\n' +
    'npm ERR! to accept an incorrect (and potentially broken) dependency resolution.\n' +
    'npm ERR! \n' +
    'npm ERR! See /Users/dhayes/.npm/eresolve-report.txt for a full report.\n' +
    '\n' +
    'npm ERR! A complete log of this run can be found in:\n' +
    'npm ERR!     /Users/dhayes/.npm/_logs/2022-03-09T14_29_07_061Z-debug.log\n'
}

UPDATE: I got this working. I ran npm outdated and went through and updated everything to latest then retried slicemachine/init and it worked this time.

It doesn't install @prismico/next, however, which is required as part of setup. So if you're doing this for the first time and come across that, just keep it in mind.

Hello @dhayes

I am glad that It worked for you. I appreciate your response to updating the thread with the solution. It will help others.

Feel free to reach out to us if you have any questions.

Thanks,
Priyanka