šŸ‘‹ Next.js Conf 2024: Come build, party, run, and connect with us! See all events

Trouble transitioning from npm to pnpm and cloning repo, but issue resolved by restarting TypeScript server

3 replies
Last updated: Jun 15, 2023
hey sanity peeps! I'm trying to clone an existing project onto a new computer. My other one is having keyboard issues. I decided to try pnpm, but simply cloning the repo and running pnpm (after installing pnpm globally of course) doesn't seem to quite work. I'm getting some red squigglies with the error
Cannot find module 'sanity' or its corresponding type declarations
. Anyone have advice on how to transition from npm to pnpm? And do I have to do anything special as far as sanity setup when cloning an existing repo of mine or should everything be ready to go since I have a cli and config file already defined?
Jun 15, 2023, 4:31 PM
Are you on v2 or v3? According to https://github.com/sanity-io/sanity/issues/3417#issuecomment-1347477233 it should technically work
Also, if you have nothing set up via
.env
variables it should work on any machine (granted you can log-in to Sanity in your browser)
Jun 15, 2023, 4:36 PM
Oh for crying out loud! I restarted my typescript server and that error went away. Geez Louise. šŸ¤¦ā€ā™‚ļø
Jun 15, 2023, 4:37 PM
Thanks though!
Jun 15, 2023, 4:37 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?