How to connect to an existing Prismic/NEXT.js project

Hello there,
I am still learning Prismic/NEXT, please bear with me, as I do not know the correct way to ask certain questions.

Just started with working for a new company and they want me to create a new page/slices that would pull up a bio section about each team member.

How will I be able to connect to the existing repository, work in a local environment, preview changes and then push the changes onto their Github?
I have their login info for GitHub and Prismic but when trying to create a local dev environment/ start a project I cannot connect to the repo. Maybe because the repo is private?

I have been searching but do not know the correct keywords and end up going in circles.

Any Help is greatly appreciated. Maybe a tutorial or guide on how to set this up correctly?

Thank you very much

Hi @wes.gilmour,

Thanks for reaching out.

I will try to help here, so first, if the Prismic repository is private, then you have to add the access token to your code, and you can find the access token in your Prismic repository setting.

You can read more about setting up your access token here

Moreover, it would be helpful if you could share with us (in a private message if necessary) your repository name and a zip file of your project to try to run it for you if you couldn't find the source of the issue.

Looking forward to your reply,
Fares

Hello!
Thank you for replying.

Was able to get it set up with some help.
-Added to the private repo
-Cloned the git repo with command line
-then run npm install in the directory to install necessary dependencies.
-now it should be ready to go
-running npm run dev will launch the site

When trying to preview a slice, instead of slice simulator it gives me the option to preview via Storybook?
Should I delete Storybook to allow slice simulator to work?
or would it be better to use Storybook?
What is Storybook? :slight_smile:
Thank you for your help,
-Wes

Thanks for your feedback.
And highly recommend you to use our slice simulator as it is maintained by Prismic, whereas it is not the case with Storybook.

Thank you very much!

1 Like