🎤 Builder Talk: The Story Behind Lady Gaga’s Digital Experience – Register now

Using Yarn.lock or Package-lock.json with Sanity Studio

3 replies
Last updated: Apr 15, 2021
Would it be possible to have the Sanity CLI respect the presence of either
yarn.lock
or
package-lock.json
and when a single lock file is present… Use that package manager? We use NPM basically everywhere and I’d love to not need to use
yarn
strictly when dealing with a Sanity Studio project.
It is a small thing, but as a paid product it would be a nice touch if this wasn’t an area we didn’t need to adjust our normal work flow.
Apr 14, 2021, 6:55 PM
We agree with the assertion and it's oft requested. Just a matter of finding the time.
Apr 14, 2021, 8:27 PM
I keep messing up my studio by running
npm i
then scratch my head for a minute when the studio crashes until I remember that I can’t use
npm
in the studio
Apr 15, 2021, 1:55 AM
You can also follow this issue on GH https://github.com/sanity-io/sanity/issues/716
Apr 15, 2021, 7:10 AM

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?

Related answers

Get more help in the community Slack

TopicCategoriesFeaturedRepliesLast Updated
Hey all - what’s the quickest way to batch delete all documents of a certain type? It looks like the `sanity` cli tool allows...Jan 29, 2021
Best way to convert HTML to a PortableText object?Dec 3, 2020
CLI Error - zsh: command not foundJan 29, 2022
DOMParser is not defined at defaultParseHtmlDec 3, 2020
Next.js and Vercel - Error! No Output Directory named "dist" foundAug 8, 2022
Custom Document Views - Is it Even Possible to Use the Structure Builder?Apr 21, 2022
Hi all! Does anyone have problem on deoplloying on Vercel (Using Next. js as a frontend)? I have two test projects, andonce...Jan 25, 2021
Issue with compiling studio, resolved by nuking node_modules and installing with `sanity install`Aug 21, 2020
How to Disallow Robots on a SubdomainNov 12, 2020
Issue setting value of JSON field with document action in Sanity StudioApr 22, 2020

Related contributions

Turbo Start Sanity
- Template

The battle-tested Sanity template that powers Roboto Studio's websites

Go to Turbo Start Sanity

Schema UI - Next.js Sanity Starter
- Template

A Next.js starter template with Next.js 15, Tailwind CSS, shadcn/ui, and Sanity CMS with Live Editing. Get production-ready React components with matching Sanity schemas and queries. Build dynamic pages faster while keeping full control over customization.

Serge Ovcharenko
Go to Schema UI - Next.js Sanity Starter

The Swaddle
- Made with Sanity

A new brand identity to represent a more mature company, to signify The Swaddle’s evolution from publisher to production house, combined with an easier to navigate platform that can surface multiple content types - drawing readers through The Swaddle’s content offering.

Nightjar
Go to The Swaddle