Skip to content

Instantly share code, notes, and snippets.

@bzerangue
Created June 12, 2019 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bzerangue/2846c8b8705962cb0ac733dccb86cc47 to your computer and use it in GitHub Desktop.
Save bzerangue/2846c8b8705962cb0ac733dccb86cc47 to your computer and use it in GitHub Desktop.
Error: Cannot find module './cors/addCorsOriginCommand'
Require stack:
- /Users/bmz/Dev/sanity/eleventy-sanity-blog-boilerplate/eleventyboilerplate/node_modules/@sanity/core/lib/commands/index.js
- /Users/bmz/Dev/sanity/eleventy-sanity-blog-boilerplate/eleventyboilerplate/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
at require (/usr/local/lib/node_modules/@sanity/cli/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
at Object.<anonymous> (~/Dev/sanity/eleventy-sanity-blog-boilerplate/eleventyboilerplate/node_modules/@sanity/core/lib/commands/index.js:64:52)
at Module._compile (/usr/local/lib/node_modules/@sanity/cli/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
sanitytutorialblog: Unhandled rejection: Error: Cannot find module './cors/addCorsOriginCommand'
sanitytutorialblog: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
sanitytutorialblog: at Function.Module._load (internal/modules/cjs/loader.js:508:25)
sanitytutorialblog: at Module.require (internal/modules/cjs/loader.js:637:17)
sanitytutorialblog: at require (/Users/bmz/Dev/sanity/eleventy-sanity-blog-boilerplate/studio/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
sanitytutorialblog: at Object.<anonymous> (/Users/bmz/Dev/sanity/eleventy-sanity-blog-boilerplate/studio/node_modules/@sanity/core/lib/commands/index.js:64:52)
sanitytutorialblog: at Module._compile (/Users/bmz/Dev/sanity/eleventy-sanity-blog-boilerplate/studio/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
sanitytutorialblog: at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
sanitytutorialblog: at Module.load (internal/modules/cjs/loader.js:600:32)
sanitytutorialblog: at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
sanitytutorialblog: at Function.Module._load (internal/modules/cjs/loader.js:531:3)
@rm-rf-etc
Copy link

I have this problem too. I'm using node v11.11.0, which one are you on? I'm also using nvm.

@rm-rf-etc
Copy link

Problem solved. Needed to update yarn using brew upgrade yarn (was on 1.13.0, upgraded to 1.17.3). Seems the problem is that Node is a dependency of yarn and it was not current.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment