Prismic sm --create-slice outputs "Error: [fetch] An unexpected (401) Error occured."

I'm running prismic sm --create-slice and its generating a 401 error.
See below:

āš” prismic sm --create-slice
āœ” Downloading framework definitions
šŸ• Enter the name of your slice (2 words, PascalCased) ProductFeatures
ā„¹ Could not create slice ProductFeatures in Prismic.                                                                     

 ERROR  Error: [fetch] An unexpected (401) Error occured.                                                               
Url: https://myproject.prismic.io/customtypes?withSlices=true

How do I address this error?

Error means that prismic account is not logged in.

Wow please improve this error message by doing a login check first!!!!!

Fixed by running this:

āš” prismic login
? Email:  me@example.com
? Password:  [hidden]
Successfully logged in! You can now create repositories.
1 Like

Hey Team,

Thanks for pointing this out, you're right this should really be clearer. I'll point this out to the team.

Thanks.

I've created an issue in the Prismic CLI github so that the dev team can see this and hopefully resolve it.

2 Likes

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