🔮 Sanity Create is here. Writing is reinvented. Try now, no developer setup

Resolving type error in Sanity config by aligning node modules

3 replies
Last updated: May 31, 2024
I'm not exactly sure how to explain my problem, but I am getting a type error in my sanity config file in the root of my project that has me stumped. Could anyone guide me on how to figure out what the problem is?
May 31, 2024, 3:10 PM
Hmm...that's a weird one. What does the error msg say when hovering over it?
May 31, 2024, 3:20 PM
Ah! I figured it out. I have two sanity config files - one in the root of my project and another in the admin/studio folder of the project.
I removed the package-lock and npm modules from the root and re-installed them which caused them to not line up with the node module folder from the admin's folder. So, I just did the same thing in the admin folder - removed the npm modules and package-lock file and re-installed them.

Now, they all line up.
😅
May 31, 2024, 3:24 PM
Congrats, glad it worked out!
May 31, 2024, 3:29 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?