For anyone starting the project around December 2023 you may want to simply follow instructions provided in npm next-sanity (v.7.0.1) as the current project runs on version 3+ which makes setting up somewhat of a pain
@allsparky8 ай бұрын
God bless
@alexisvacilli28926 ай бұрын
Thank you
@marioskanellopoulos8780 Жыл бұрын
Never expected anything less from you Sonny. Joining this community and watching your builds made me wanna become even better. You rock dude. Much appreciation and respect for all the hard work you re putting in. 2023 will be the year we will all remember for years to come.
@SonnySangha Жыл бұрын
Hell yeah dude!!! Love this energy #PAPAFAM
@TheGaoNan Жыл бұрын
Sonny, just wanted to let you know I've been watching your videos from the beginning and you are definitely my favorite youtuber in the tech space, love the way you are teaching, the great energy and that you always teach the latests most recent technologies. You've really helped me become a better developer and exceed in my career. Thank you for that, and keep up the great work!
@SonnySangha Жыл бұрын
Wow thank you so much I appreciate you!!! 🙏🏽🙏🏽
@kevinbodi7778 Жыл бұрын
For issues with 'previewData()' and previewMode. Here's the issue: It seems that Next has replaced 'previewMode' with something called 'draftMode', which 'next-sanity' doesn't have any documentation on, yet. Here's the 3 ways you can solve this: 1. Read Next docs for the new draft mode and figure it yourself. 2. Skip the preview-step for now and wait for 'next-sanity' to be updated with new documentation and features. (my personal choice) 3. Downgrade to next '13.2.x' and it should work.
@mateusmenesesDev Жыл бұрын
In fact, if you test Preview mode in build, it will work. What happens is that for some reason, in dev it is resetting the cookie when reloading the page. But in production this won't happen :)
@ak27129 Жыл бұрын
Even if i go with 2nd option, later on the usePreview func is being used to render the bloglist, what can be done? please assist me
@ak27129 Жыл бұрын
@@mateusmenesesDev How can I go with option 2 since later on the usePreview func is being used to render the bloglist, what can be done? please assist me
@kgamer58427 ай бұрын
I am staying with the option 2. As i am at that part now
@emmaaberg3566 Жыл бұрын
To the person who asked about sitemaps: next-sitemaps works if you make the pages static like he shows with the "generateStaticParams()" at around 2:20:00.
@vander_eft Жыл бұрын
Going through this on 5/30 and Sanity has made the first 30mins of setup basically done out of the box!
@aymanechaaba Жыл бұрын
What is outdated in this course?
@iLuliBest Жыл бұрын
Best tutorial I've ever seen, in its entirety. Most of all, it helped me integrate Sanity, all the other tutorials I followed brought me error after error and prevented me from continuing my project. Thank you very much for the material you provide Sonny, it's of great help to many.
@sh44ko58 Жыл бұрын
How did u fixed the problem with import {visionTool} from '@sanity/vision' in sanity.config.ts, im getting an import error ):
@iLuliBest Жыл бұрын
@@sh44ko58 sorry I just saw ur comment, did u solved it? I haven't got that error
@sh44ko58 Жыл бұрын
@@iLuliBest ya i solved it, i had the problem with the old version
@PattyBeautCode Жыл бұрын
Thank you for the tutorial !The combination with NextJS 13 and Sanity V3 is THE NEXT LEVEL PLAY !!!! Plus +++ The preview mode is awesome and server side rendering is incredible !! The build is smooth !!!! Looking forward more with NEXTJS + Sanity V3 !
@babajidebotoku79718 ай бұрын
Just tried building this a second time and its much much easier with the new sanity.
@Archibong.samuel4 ай бұрын
whaaaaah!!! Sonny, you are an eye opener! You awakened a programming mage.
@aindrailsantra6886 Жыл бұрын
TypeError: Cannot read properties of undefined (reading 'call') Im getting this error when i load the studio site plz help
@terizas7520 Жыл бұрын
I have the same error: TypeError: Cannot read properties of undefined (reading 'call')
@kulvirsingh4568 Жыл бұрын
have u got any solution please let me know
@kulvirsingh4568 Жыл бұрын
@@terizas7520 have u got any solution please let me know
@carlesgalino3213 Жыл бұрын
That tutorial step by step is actually dope. Congrats and thank you Sonny
@dalestewart Жыл бұрын
It was certainly a fantastic experience building my own personal BLOG with Next.js 13
@TheAppliancePlug Жыл бұрын
I keep getting an error when I run npm run build. I am getting an error message of 'Post' refers to a value, but is being used as a type here. Did you mean 'typeof Post'? I seem to be getting a lot of errors when trying to build out the app. Any recommendations. Thanks
@mdsf28 Жыл бұрын
Did you found any way around it.. i am also getting build time error with 'Post' and PortableReact 'component' prop
@healthy6844 Жыл бұрын
Did you find a solution to Post referers to a value?
@healthy6844 Жыл бұрын
@@mdsf28 Did you find a solution to the build time error with Post?
@mdsf28 Жыл бұрын
@@healthy6844 I used ':any' type wherever Post type was used...
@JusTheWebDevNJIT Жыл бұрын
for those of you getting SyntaxError: Unexpected token u in JSON at position 0 at JSON.parse () while trying to get access to studio export StudioPage as an arrow function This worked for me. const StudioPage = () => {} export default StudioPage
@Saradomin65 Жыл бұрын
Might I add to this to also do this to both the `head.tsx` and `loading.tsx`.
@ethbuilderdeutschland4572 Жыл бұрын
@Justin Diaz@@Saradomin65 Thanks
@robbiecrenshaw8393 Жыл бұрын
Wow this is a great video, I was literally just starting a new project using the new app dir, and was debating using Sanity. Now im building my project with Sanity! TY for such a great video!
@jmg950910 ай бұрын
**IMPORTANT** - What i've been looking for - how to structure images using RichTextComponents - 2:10:42 Building the Rich Text Components Component 26:30 - sanity config name and title 39:20 - Theming for sanity (branding the interface) 40:05 - Sonny says you can make the interface completely bespoke ^ Reach - 1:23:11
@ElNicopewpew Жыл бұрын
Great tutorial as always! Ive got a wish for a future tut, a pagebuilder with sanity and next13! Mostly because im almost done with mine, and would like to see if Ive done it the correct way x) Only thing im missing is a language selector and PREVIEW. Preview is hella hard to get working with this modular setup of mine.
@seanhowe129 Жыл бұрын
After watching your videos, I have become a big fan of Sanity! GROQ in my opinion is much easier than say GraphQL. It would be good to see a tutorial on an app that uses user authentication to connect to Sanity and allows for a user Profile/Dashboard with user info and say listings if it's a marketplace. There seems to be a lot of adapters for other databases or CMS's but not much support for Sanity and Next-Auth.
@outsocialvoices9 ай бұрын
Watching from kenya
@CasualAnouar Жыл бұрын
That was a smooth build !! thank you @sunny ... much love
@abhinandangautam5583 Жыл бұрын
This is really amazing sunny. Great experience of learning Next js 13 + Sanity v3 project 😍😍
@abdu1wahid105 Жыл бұрын
Guys, congrats to you Sonny and also Jay on hitting 200k subcribers!! 💪🧑🎓Let's GO!!
@luckychanda8644 Жыл бұрын
Enjoying and watching this session right through Zambia😎😎
@derekprieur5258 Жыл бұрын
Another great video packed with new tech, appreciate all the work you put into these sonny! 🔥
@danielmuriithi8486 Жыл бұрын
Thanks for hooking us up sonny
@SonnySangha Жыл бұрын
Any time brother!!
@nafsi4473 Жыл бұрын
I`m getting this error( Unhandled Runtime Error TypeError: Cannot read properties of undefined (reading 'call') ) when I try localhost:3000/studio
@ZaphyreLtd Жыл бұрын
Getting the same error. Any solutions to this? Unhandled Runtime Error TypeError: originalFactory is undefined
@ukaszkonatowski4661 Жыл бұрын
same :/
@synt-x6458 Жыл бұрын
Got the same error..
@ukaszkonatowski4661 Жыл бұрын
For me it is working fine only after I do yarn build and yarn start - so only for production build. I don't know why.
@ZaphyreLtd Жыл бұрын
@@ukaszkonatowski4661 Tried this. Did not work for me tho. Thanks for the idea.
@KHANTANVEER Жыл бұрын
You're importing a component that needs createContext. It only works in a Client Component but none of its parents are marked with "use client", so they're Server Components by default.
@marsfrommars7858 Жыл бұрын
37:03 yeah man, it's so damn powerful, thanks you for teaching us all this content. 🔥
@mikenieva Жыл бұрын
I am getting this error: "Error: Hydration failed because the initial UI does not match what was rendered on the server." Not so sure if there is a file that I missed to fix. This is when I launch localhost:3000/studio
@xzore-vy8qq Жыл бұрын
make sure the Header referenced in layout.tsx is inside the body
@alexandtmuntean8540 Жыл бұрын
Error: Unable to load preview as you're not logged in..there is a cookie issue, something related to onPublicAccessOnly(), because I'm logged in to the sanity studio..if I comment onPublicAccessOnly funtion then it works but render only published documents from sanity...
@zerokool280 Жыл бұрын
This is the issue that I keep running into as well. It's been bugging me for a minute.
@alexandtmuntean8540 Жыл бұрын
@@zerokool280 allow third-party cookies in the browser settings..that worked for me
@zerokool280 Жыл бұрын
@@alexandtmuntean8540 I'll try that out and see what happens. Thanks for the reply. I've been banging my head off the wall trying to figure out what I've messed up lol
@zerokool280 Жыл бұрын
@@alexandtmuntean8540 - UPDATE - it worked and I now have no issues! Thank you so much!
@iLuliBest Жыл бұрын
@@alexandtmuntean8540I thought my preview wasn't working for another reason and it's been my headache for two days now. Now it's working. Thank you so much for this!
@user-fx5ly9th4h Жыл бұрын
help..... /app/(user)page.tsx when I import { previewData } from 'next/headers', an error says previewData is not exist...
@wiseGrant Жыл бұрын
Amazing! I am building along and love this!
@FN-zg8lj Жыл бұрын
finally completed a project without endless bugs! Still having a bit of an issue with projectId upon deployment but I can work with that for now.
@sankalpietechtips5 ай бұрын
Damn boiii! I love this guy's vibe.
@BransTiong Жыл бұрын
preview mode does not work with previewData() now.Need help on this if you are able to. Wanted to check how to implement if i am on preview mode or not
@20MrAmir0110 ай бұрын
I am junior front-end developer and to be honest , Sanity v3, is not easy to learn for me (this video has first video about Sanity v3, that I saw it).
@petersoncaetano9603 Жыл бұрын
good evening man I've been following your work for a month here in Brazil very good, but I noticed that this last video has no subtitles, can you put it please, it helps me a lot, because I can translate the subtitles and understand everything, thank you, congratulations for the excellent work
@sayanmanna2511 Жыл бұрын
why scroll restoration is not happening??????
@krunalchauhan5780 Жыл бұрын
Finally complate this after 1.5 month but feels like I learn many things :) Thanks buddy!
@rayhanpatel8271 Жыл бұрын
Bro can you share your repo please
@rayhanpatel8271 Жыл бұрын
@kunalchauthan5780
@jesseboham9593 Жыл бұрын
when trying to set up preview mode I get the error module "next/headers" has no exported module previewData in the page.tsx file.
@minhazkhan1291 Жыл бұрын
You are a real Boss. Highly appreciate your work.
@TheRoddie16 Жыл бұрын
I've been using Next.js for about a year or two now, and this is the first video I've watched where Server Side Rendering and caching finally clicked for me. A masterclass. You've definetely earned a sub out of me man.
@SonnySangha Жыл бұрын
Thank you so much for the support!!!
@TheRoddie16 Жыл бұрын
@@SonnySangha Quick Question: I want to implement a search bar to my home page. Id imagine you do this logic client side to limit requests to the server right? Would it be as simple as placing a filter on our array of Posts?
@albinmiftari1832 Жыл бұрын
I have a weird problem. "._createAt" works to grab using groq, and I can show the entire post content and it work and shows the ._createAt. But as soon as I try to use post._createAt it will return undefined and cant turn it to a date with toLocaleDateString or moment.js. So I dont quite understand the problem.
@omarjab Жыл бұрын
it should be "_createdAt" by default
@rockbelleh6237 Жыл бұрын
Yo guyz....PAPA FAM all the way much love 😍😍😍😍😍
@Degent-Dev Жыл бұрын
Module '"next/headers"' has no exported member 'previewData'. I am getting this error while importing previewData in (user)/page.tsx. Please help me🤞🤞
@DigitalAlchemyst Жыл бұрын
@DigitalAlchemyst 1 second ago Can confirm that this working in current versions as of writing this comment with the following versions next 13.4.19 "sanity": "^3.15.1", "next-sanity": "^5.4.4", "@sanity/client": "^6.4.9", "@sanity/icons": "^2.4.1", "@sanity/image-url": "^1.0.2", "@sanity/ui": "^1.7.8", "@sanity/vision": "^3.15.1", You will need to do a good bit of reading across various sources including, next draftmode in app router from next docs, LiveQueryProvider info in preview kit, and the preview app router docs from next-sanity I also found posted today in sonnys discord general chat channel a blog post about setting up sanity that had some good info, and a video ceom cosmic about using this set up with cosmicjs (not trying to plug others content just leading to solid info) ALL of this info together was what it took to find all the right pieces to the puzzle to get it working. But this also took a bit of understanding of the nextJS environment and wasnt exactly nobo friendly, i count my self fortunate to have gathered the knowledge a did in such short time otherwise i would have been lost beyond belief, Anyone looking for further help can find me in Sonnys discord under the same user name. I think I may make a quick video on how i solved it would probably be easier than explaining multiple times
@honefone11 ай бұрын
this tut is just insanity
@gadgetboyplaysmc Жыл бұрын
How many hours did this take you to make before the tutorial?
@tristan1805 Жыл бұрын
3 This was live
@morchellemusic2829 Жыл бұрын
we flying, love it ahahahha
@iLuliBest Жыл бұрын
I'm having trouble when trying to enter to /studio :( Failed to compile ./node_modules/@sanity/ui/dist/index.esm.js Module parse failed: 'import' and 'export' may appear only with 'sourceType: module' (61:0) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. I've already tried running it again with 'npm run dev' again and also 'npm i @sanity/ui' - the error's still there. Anyone else?
@midberg Жыл бұрын
If you are using yarn add this to package.json.: "resolutions": { "@sanity/ui": "1.0.5" } If using npm add this to package.json.: "overrides": { "@sanity/ui": "1.0.5" } Then you need to delete the lock file, delete node_modules and install again. This fixed it for me. (It's seems to be a bug that the engineering team is now aware of)
@iLuliBest Жыл бұрын
@@midberg thank you so SO MUCH! It worked for me :') I deleted "@sanity/ui": "1.0.5" from "dependencies" on package.json because if I didn't, when I added the "overrides" it'd throw me an "npm ERR! Override for @sanity/ui@^1.0.6 conflicts with direct dependency"
@cruzeirocrivellari Жыл бұрын
@@midberg Thank you!
@Anup_x Жыл бұрын
@@midberg He thanks for help. I'm not programmer, would you please tell me where to find lock file to delete and how to install both of them again. Really appericiated.
@kenthefley2226 Жыл бұрын
You and I have the same taste in color. I love that orange-yellow against a dark gray. Check out the vs-code theme "sunset."
@jingli9232 Жыл бұрын
awesome project, looking forward to more web3 projects with next13
@yaninyz_witt-mwa3687 Жыл бұрын
Getting this error after even installing @sanity/ui... TypeError: Cannot read properties of undefined (reading 'call')
@yaakovs.5476 Жыл бұрын
the same, sb got an answ?
@universe_decoded797 Жыл бұрын
Got the same issue. Using next 12 and the next 12 sanity code. Did you find the issue already? Please help
@sayanmanna2511 Жыл бұрын
The image loading is not fast in mobile., it feels buggy. Any solution???
@pepadosoudil Жыл бұрын
⚠Guys how big is your .next folder please?⚠
@AbdullahOfficial-ll2bz Жыл бұрын
sir plz make project with next js and firebase. because if we made application by sanity for our clients then , it will be very costly because Sanity has a very limited api calls per month.
@gamerquantum2847 Жыл бұрын
Do you have any idea how much sanity charges after free version
@cuneytcz Жыл бұрын
I have never seen a man who talks as much as you in my brother life.
Hey guys! How can we custom the preview in getDefaultDocumentNode if I want to show the preview per post?
@easydua Жыл бұрын
I'm trying to figure it out too :( want to preview a single post. I keep getting the following error: TypeError: useReducer only works in Client Components. Add the "use client" directive at the top of the file to use it.
@lle5159 Жыл бұрын
@@easydua Hi! How did you make that progress? Did you try add "use client" at the top of the file like recommended lol :) hope you can make it happen
@easydua Жыл бұрын
@@lle5159 I had imported the wrong previewSuspence component 🤦🏻♂️ It’s working now 🤓
@lle5159 Жыл бұрын
@@easydua Awesome! Can you also guide me on how to do that please?
@hd.r6545 Жыл бұрын
Smashed for such good content!
@mranderson3441 Жыл бұрын
Great content, bro!👍👍👍 You are just a gem on
@diego0ji Жыл бұрын
Amazing tutorial! Thanks🖤
@dalestewart Жыл бұрын
Sanity v3 is awesome!
@nelohenriq Жыл бұрын
Hi Sonny, i'm following your tutorials and learning a lot, i'm struggling hard to make the rich text component to work, all the code is correct but i'm getting an error on this line: where vscode underlines the components property with red and the error is what follows "React components to use for rendering Type '{ types: { image: ({ value }: any) => JSX.Element; list: { bullet: ({ children }: any) => JSX.Element; number: ({ children }: any) => JSX.Element; }; block: { h1: ({ children }: any) => JSX.Element; h2: ({ children }: any) => JSX.Element; h3: ({ children }: any) => JSX.Element; h4: ({ children }: any) => JSX.Element...' is not assignable to type 'Partial'. Types of property 'types' are incompatible. Type '{ image: ({ value }: any) => JSX.Element; list: { bullet: ({ children }: any) => JSX.Element; number: ({ children }: any) => JSX.Element; }; block: { h1: ({ children }: any) => JSX.Element; h2: ({ children }: any) => JSX.Element; h3: ({ children }: any) => JSX.Element; h4: ({ children }: any) => JSX.Element; blockqu...' is not assignable to type 'Record'. Property 'list' is incompatible with index signature. Type '{ bullet: ({ children }: any) => JSX.Element; number: ({ children }: any) => JSX.Element; }' is not assignable to type 'PortableTextTypeComponent | undefined'.ts(2322) react-portable-text.d.ts(167, 3): The expected type comes from property 'components' which is declared here on type 'IntrinsicAttributes & PortableTextProps'" the blog still works but the bulleted list is not working, not showing the bullets and without indentantion, can you please help? Thanks in advance!
@MrMisterPickles Жыл бұрын
Check the formatting in your RichTextComponents.tsx. On Sonny's screen it visually looks like 'list: ' and 'block:' are inside of 'types' because of the way 'types' is closed on screen but both of those should be OUTSIDE of types. That solved the issue for me, anyway. Good luck!
@_13eki Жыл бұрын
on 33:02 i am getting an error saying like this and i couldnt find the fix help guys ./node_modules/@sanity/ui/dist/index.esm.js Module parse failed: 'import' and 'export' may appear only with 'sourceType: module' (61:0) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file.
@BarakAlmog Жыл бұрын
Same. Nothing I tried helps. Lost here.
@maasondelgado8001 Жыл бұрын
@@BarakAlmog same
@BarakAlmog Жыл бұрын
@@maasondelgado8001 fixed it. Followed the suggestion in one of the other comments here. It worked.
@maasondelgado8001 Жыл бұрын
@@BarakAlmog which one?
@BarakAlmog Жыл бұрын
@@maasondelgado8001 one of them mentioned adding an "override" prompt to the package.json, erasing the package lock and the node_modules folder, and reinstalling them. Apparently, some issue with the sanity package that the devs are aware of. It worked for me.
@tomasvivaldi4688 Жыл бұрын
Having a lot of trouble with the PreviewSuspense component. Spend hours trying to debug it bug no luck so far (timestamp: 1:18:10)
@martins6341 Жыл бұрын
Yo sonny please can you make a react native app that is fully functional Teaching us authentication ,roles such as admin and user identification , Cauz most of your videos don’t cover these things especially the role identification
@kamaboko1 Жыл бұрын
So before embarking on this project, I'd like to know how many people actually got this thing up and running and deployed w/o some glaring show stopper problem.
@JesseJames7 Жыл бұрын
It worked for me. Many others didn't and half way through there would be errors. But this was the first Sanity/Next tutorial I found that actually worked with maybe some small problem solving here n there
@armincorcausevic607 Жыл бұрын
Worked for me also, but I had some issues along the way.
@kamaboko1 Жыл бұрын
Tried it. Game stopper just getting the installation. npx create-next-app -e with-tailwindcss no longer works. Tried the listed current one on tailwind and the folder structure and files are different. Basic setup in this tut is already deprecated.
@user-sd8yg1qe7o11 ай бұрын
Great vid! One thought though, I wish you didn't need to set live preview mode via the URL. I can imaging my clients forgetting to do this. Is it possible to detect if a user is logged into the admin screen from a non-admin page? That way you could have live preview on by default (and maybe provide some UI to turn if off).
@SuperPompey77 Жыл бұрын
watched it from Victoria, BC, Canada
@MahmudulHasan-zw5ow Жыл бұрын
there was an concept you didn't mention it the dynamic head tag in the head.tsx file
@WilliesBayler Жыл бұрын
I wonder why I keep getting a lot of this kind of errors "TypeError: Cannot read properties of null (reading 'map')" , "TypeError: Cannot read properties of undefined (reading 'startsWith')" Anybody?
@aashishsinghal7331 Жыл бұрын
console.log the Array you are trying to map, before you map it, and see what is logged, this comes if the variable is undefined or null, if so add a null check before mapping and it should be resolved
@piyushyadav7764 Жыл бұрын
It's just means that you are not getting any value from from the variable you are trying to map...make sure your variable have data or not
@WilliesBayler Жыл бұрын
@@aashishsinghal7331 Thank you
@WilliesBayler Жыл бұрын
@@piyushyadav7764 Thank you
@Mrsimanater Жыл бұрын
Big up Man LIKE SONNY!!!
@edwintorres717 Жыл бұрын
Wow, thank you so much, what a great video tutorial. 🤯
@WaterfowlCoding Жыл бұрын
so in stead of typescript im using javascript, still using next and tailwind and sanity, but the problem I've run into is that the posts.config file is giving sanity an error, I was wondering if you or anyone would be familiar with this type of error and if you have a workaround this, all the answers I get is to just get rid of the postcss.config file entirely but that will get screw everything up because tailwind needs it. thank you !
@brayancuenca6925 Жыл бұрын
Create a tailwind.config inside the sanity folder
@philipc8705 Жыл бұрын
somehow when i select localhost:3000/studio i get a 404 page. Followed all the steps any suggestion
@philipc8705 Жыл бұрын
fixed it
@adamsorin4555 Жыл бұрын
@@philipc8705 how? i am getting module not found '@sanity/ui' even if i install it manually
@kulvirsingh4568 Жыл бұрын
please let me know how u fixed it
@philipc8705 Жыл бұрын
Basically re did all the steps from the beginning and found a few bugs
@RenatoMartins-jy1zw Жыл бұрын
How could I implement the preview mode on the main page of the post?
@easydua Жыл бұрын
I'm trying to figure it out too :( I keep getting the following error: TypeError: useReducer only works in Client Components. Add the "use client" directive at the top of the file to use it.
@cryrtex21 Жыл бұрын
really nice video. I had fun doing it. But it took me 6 hours :D
@abdu1wahid105 Жыл бұрын
👍 Thats kinda quick... you're either one fast coder or fast learner or both! 😁 Me=7.5 hours
@rayhanpatel8271 Жыл бұрын
@cryrtex9682 can you share your repo if you can
@rayhanpatel8271 Жыл бұрын
@@abdu1wahid105 can you share your repo please
@eia14 Жыл бұрын
Hi! I keep getting this error Cannot find module '@sanity/ui' Keep getting this when I try to go to the /studio Unhandled Runtime Error Error: Cannot find module '@sanity/ui' The loader shows for a sec and the this happens. The studio worked for a couple of hours and then this started to happen. I tried installing @sanity/ui and nothing. Does anyone have a hint on how to solve this?
@maasondelgado8001 Жыл бұрын
I have the same issue
@wanilyas3073 Жыл бұрын
@@maasondelgado8001 If you are using yarn add this to package.json.: "resolutions": { "@sanity/ui": "1.0.5" } If using npm add this to package.json.: "overrides": { "@sanity/ui": "1.0.5" } Then you need to delete the lock file, delete node_modules and install again. This fixed it for me. (It's seems to be a bug that the engineering team is now aware of)
@Anup_x Жыл бұрын
@@wanilyas3073 He thanks for help. I'm not programmer, would you please tell me where to find lock file to delete and how to install both of them again. Really appericiated.
@wanilyas3073 Жыл бұрын
@@Anup_x delete package.lock.json and node_module file...go edit package.json and then open terminal and run command npm install
@tys3v Жыл бұрын
@@wanilyas3073 Worked for me, thank you!
@codingvidyalaya83709 ай бұрын
if you are watching in 2023 you dont need to figure about embedding sanity and all and next sanity just install latest next sanity thats all
@shivrajnag12 Жыл бұрын
Hi Sonny awesome tut, can u please help me debug why using previewData throws Server Error Error: Invariant: Method expects to have requestAsyncStorage, none available
@chiubaca Жыл бұрын
yeah getting this too. did you manange to figure this out?
@kevinbodi7778 Жыл бұрын
@@chiubaca If you downgrade to next '13.2.x' it should work. It seems that Next had replaced 'previewMode' with something called 'draftMode', which 'next-sanity' doesn't have any documentation on yet.
@vinkim2802 Жыл бұрын
@@kevinbodi7778 Did you ginish the whole project? I couldnt continue mine too, and im stucked for days.
@kevin_bodi Жыл бұрын
@@vinkim2802 I followed this recipe for a larger service I'm creating, which is still not finished. But the preview here isn't essential, so you can just skip it. If you want to do it anyways, search for the npm package called next-sanity and read their documentation. They have introduced a proper way to create previews on the newest versions of next and Sanity just a few weeks ago.
@vinkim2802 Жыл бұрын
@@kevin_bodi Thanks Kevin!
@AurelioPita Жыл бұрын
Great content!
@tomasvivaldi4688 Жыл бұрын
For some reason after uploading it to Vercel I can’t access studio anymore on phone and on the pc version of safari
@PTBKoo Жыл бұрын
Can’t really switch from pages to app directory yet so would like to see some tutorials with sanity v3 using pages directory.
@pepadosoudil Жыл бұрын
Hi Sonny🚀, thank you so much in advance for the great video❤. Everything is working great, but I would like to ask for your advice. How do I generate the original head with meta and post title. I would need to improve SEO for google search engine. Thanks again and I look forward to more awesome videos! JD
@rajsahu6699 Жыл бұрын
On minute 2:00:14 you give type of Post but I'm getting erro Post' refers to a value, but is being used as a type here ts(2749) please help me
@designtocode8236 Жыл бұрын
Yeah help us
@Dragorad__ Жыл бұрын
i have same problem, how did you fix it
@Dragorad__ Жыл бұрын
@raysahu please did you found why it happends
@nurudeensaliu7696 Жыл бұрын
Import Post from typing
@piyushyadav7764 Жыл бұрын
Damn good content Sonny as always...but Sonny how can I seperate my comment section for each blog post..any advice?
@watchyoutubeaccount1 Жыл бұрын
Thank you! This was so helpful! Question: How do you render an array of images (aka gallery) into individual divs in a post?
@TMLA00125 күн бұрын
how do i track login activities in extjs with sanity???
@realzire Жыл бұрын
any idea on how to add code blocks?
@darelbvcr687 Жыл бұрын
Can u make app in next js 13 with only tailwind and typescript? Without sanity etc
@NAMMAPAYAKAPLAYS Жыл бұрын
with any other backend solutions. without headless cms
@eugenebesedovsky Жыл бұрын
This is an awesome build! Thanks so much. Everything works like a charm! Except I still needed to import types from the typings list, why is that?
@moseskoroma6092 Жыл бұрын
Please sonny use firebase and next js 13 with tailwind please thanks in advance sir.
@Çalhanoğluuuu Жыл бұрын
It was easy before. Now it seems like really complex. Development should be made easy after the update, here they made it complex. Embedding the sanity studio inside the next js project folder ain't working for me. It keeps throwing error. The current Beta version is really problematic.
@ahmadhawamdah1809 Жыл бұрын
For me too!
@paieu Жыл бұрын
I am starting this now... and would rate for you guys..
@reezayn10 ай бұрын
ClientSideRoute: 1:44:30
@DianaDetroit Жыл бұрын
has anyone experienced this error? I have files exactly like Sonny and cant figure it out.....error - (admin)/studio/[[...index]]/page.tsx doesn't have a root layout
@albinmiftari1832 Жыл бұрын
I cant go into /admin on the published website. But I have deployed with Netlify so Im not quite sure if thats the problem.
@ggnewid1778 Жыл бұрын
At - 2:22:52 - I am facing an error when , trying to build using - "npm run build". The error says ---> "Generating static pages (3/5)TypeError: Cannot read properties of null (reading 'mainImage') at Post (D:\2022 - Complete Web Development Bootcamp\Web Development\Project 1 - BLOG\personal-blog-aayush\.next\server\app\(user)\post\[slug]\page.js:662:69)" Somebody please help.
@easydua Жыл бұрын
I have found that wrapping the sections where we out the post data with conditional statements fixes that issue. so have { post && post.mainImage && } You'll have to do it for all the snippets within the [slug].page.tsx file
@ggnewid1778 Жыл бұрын
@@easydua Thanks a lot! It worked.
@schism1986 Жыл бұрын
@@easydua that works to get rid of the error on build time but you'll notice that now you can't preview unpublished posts. That is because we need to send a read token with our query because unpublished posts are private and need authentication. generate a read token in your sanity project and then add it to your sanity.client.js. then you'll need to differentiate between published and unpublished by checking the drafts folder but you'll get there when you get there ;) gl!
@easydua Жыл бұрын
@@schism1986 thanks for the response. Mine is working??? I can see unpublished posts too.
@schism1986 Жыл бұрын
@@easydua really?? that's interesting.. what version of sanity are you using? i find that odd because the reason it was complaining in the first place was because it was not being able to fetch drafts, as drafts are private and Sonny didn't include the token in his query. So by placing the checks you suggested it wont throw an error but also shouldn't show anything because the fetch still came back null afterall.. But hey as long as it works.. right? :D cheers!
@federicopeloso1416 Жыл бұрын
Hi, very nice video! May I ask you what extension you use for folder icons?