Register now - Learn how Tecovas roped in success with Sanity and Shopify 🤠

New error while deploying GraphQL in

7 replies
Last updated: Nov 12, 2021
Hi Everyone!
New Error I’ve never seen before while deploying GraphQL (
sanity deploy graphql

Error: Cannot find module '@sanity/core/_internal'

So far I’ve tried:
• Reinstalling Sanity
• Reloading node_modules and all yarn
• If I remove all of the items from my schema
deploy graphql
works fine. Probably because its not needing to do anything.• Other builds I have locally seem to work fine.
What am I missing? Thanks!!!

Full Error:

Error: Cannot find module '@sanity/core/_internal'

Require stack:

- <...>/config.ts

- <...>studio/schemas/documents/sitePost.js

- <...>studio/schemas/documents/index.js

- <...>studio/schemas/schema.js

- <...>studio/node_modules/@sanity/core/lib/actions/graphql/getSanitySchema.js

- <...>studio/node_modules/@sanity/core/lib/actions/graphql/deployApiAction.js

- <...>studio/node_modules/@sanity/util/lib/dynamicRequire.js

- <...>studio/node_modules/@sanity/util/lib/lazyRequire.js

- <...>studio/node_modules/@sanity/core/lib/commands/build/buildCommand.js

- <...>studio/node_modules/@sanity/core/lib/commands/index.js

- <...>studio/node_modules/@sanity/core/lib/index.js

- /usr/local/lib/node_modules/@sanity/cli/bin/sanity-cli.js

- /usr/local/lib/node_modules/@sanity/cli/bin/sanity
Nov 7, 2021, 2:16 PM
Hi User. I suspect it’s related to this and should be resolved on the next release.
Nov 7, 2021, 9:16 PM
Sorry it’s held you up.
Nov 7, 2021, 9:16 PM
Hi User,
Thanks for the response! is that a fix I can run on my end?
Nov 7, 2021, 9:21 PM
user A
Thanks for the info. Quick question on this. Why is it only happening on one install?

Is it due to the relationship connections of the data?
Nov 7, 2021, 10:06 PM
Hi User. Hopefully this was resolved with 2.21.10. When you get a chance to try that version, please let me know if the problem persists.
As for some installs working and some not, it sounds like it could be related to different versions (perhaps the functioning installs weren’t yet upgraded to the regression version).
Nov 11, 2021, 11:59 PM
Hi User,
The upgrade did the trick
user X
nailed it. Thanks for the help and directing me to to that fix!!!
Nov 12, 2021, 4:15 PM
Ahh nice! So glad to hear it.
Nov 12, 2021, 4:22 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?

Categorized in