Troubleshooting installation of @sanity/google-maps-input and missing module error

16 replies
Last updated: Oct 5, 2020
Hi! 😯All was running fine with my project Sanity studio...
till I installed
@sanity/google-maps-input
and it dose not look very good😮!I get a long list starting with error:

Error: Cannot find module 'prop-types'
Require stack:
Any idea? Thank you!!!
AI Update

The "Cannot find module 'prop-types'" error you're seeing is a missing dependency issue. The @sanity/google-maps-input plugin relies on prop-types but it's not being installed automatically as a peer dependency.

Here's how to fix it:

Install the missing dependency:

npm install prop-types

or if you're using yarn:

yarn add prop-types

Why this happens:

The @sanity/google-maps-input plugin was built for an earlier version of Sanity Studio and may have outdated dependency declarations. In older React applications, prop-types was commonly used for runtime type checking, but in modern setups it needs to be explicitly installed if a package requires it.

Additional troubleshooting:

If you continue to see errors after installing prop-types, you might also need to check:

  1. Studio version compatibility - The @sanity/google-maps-input plugin may not be fully compatible with Sanity Studio v3/v4. Check the plugin's npm page or GitHub repository for compatibility information.

  2. Other missing dependencies - Sometimes plugins have other peer dependencies. If you see similar "Cannot find module" errors for other packages (like styled-components), install those as well:

    npm install styled-components
  3. Consider alternatives - If the plugin continues to cause issues, you might want to look at building a custom input component using the Google Maps JavaScript API directly, or check if there are more recently maintained alternatives in the Sanity ecosystem.

After installing the missing dependencies, restart your Studio dev server and the errors should be resolved!

I just
uninstall @sanity/google-maps-input
and once I run
sanity start
I getFailed to compile.


Error in ./node_modules/@sanity/base/lib/components/MissingProjectConfig.js

Module not found: Error: Part "part:@sanity/components/dialogs/fullscreen-message" not implemented by any plugins

@ ./node_modules/@sanity/base/lib/components/MissingProjectConfig.js 12:48-109

@ ./node_modules/@sanity/base/lib/components/SanityRoot.js (part:@sanity/base/sanity-root)

@ ./node_modules/@sanity/server/lib/browser/entry-dev.js

@ multi ./node_modules/normalize.css/normalize.css ./node_modules/@sanity/server/lib/browser/entry-dev.js
I’d try deleting the
node_modules
Ā folder an run
sanity install
Ā again
OK! Thank you
user Y
! I'll do that
user Y
As for the
@sanity/google-maps-input
is this a suggested install? in fact there is not much documentation on the page on how to use it: https://www.npmjs.com/package/@sanity/google-maps-input
ouch!
user Y
again
āœ”ļø Compiling...Failed to compile.

Error in ./node_modules/@sanity/base/lib/components/MissingProjectConfig.js
Module not found: Error: Part "part:@sanity/components/dialogs/fullscreen-message" not implemented by any plugins
@ ./node_modules/@sanity/base/lib/components/MissingProjectConfig.js 12:48-109
@ ./node_modules/@sanity/base/lib/components/SanityRoot.js (part:@sanity/base/sanity-root)
@ ./node_modules/@sanity/server/lib/browser/entry-dev.js
@ multi ./node_modules/normalize.css/normalize.css ./node_modules/@sanity/server/lib/browser/entry-dev.js
Huh - what version are you on? Could you share your
sanity.json
?
Super weird – could you for good measure try
sanity upgrade
user Y
thanks. Yes! will try
🌈
user Y
thank you! that was it! it did update 6 folders!
user Y
so probably I can safely install
@sanity/google-maps-input
now? wold this be the best choice to handle google-map? thank you!
for the google maps thing, scroll down on this page: https://www.sanity.io/docs/geopoint-type
user Y
Great! Thank You! šŸ™šŸ‘šŸŒ»
it worksšŸŽ‰ very easy to use! nice and amazing
user Y
Thank you!
user Y
😦 You guys have thought of everything! Lucky the rest of my team aren't tech savvy enough to know how almost redundant Sanity makes me 🤣
user B
haha! well, I like to think that it only makes you able to do more interesting things with your time, so in fact, it makes you even more invaluable!

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Was this answer helpful?