ndimatteo / HULL

💀 Headless Shopify Starter – powered by Next.js + Sanity.io
https://hull.dev
MIT License
1.36k stars 167 forks source link

Tried deploying Hull from Vercel Interface. #138

Closed enterpriseSoftware closed 5 months ago

enterpriseSoftware commented 5 months ago

Tried deploying from Vercel interface got this error. I thought I saw where this was a bug a year ago and it was commented it wouldn't be fixed? Please tell me which Vercel Next.js with shopify integration works.

Deployed from here. https://vercel.com/new/templates/next.js/hull-sanity-shopify

error - Failed to load next.config.js, see more info here https://nextjs.org/docs/messages/next-config-error 10:12:42.113 |   10:12:42.114 | > Build error occurred 10:12:42.115 | Error: Configuration must contain `projectId` 10:12:42.115 | at exports.initConfig (/vercel/path0/node_modules/@sanity/client/lib/config.js:42:11) 10:12:42.115 | at SanityClient.config (/vercel/path0/node_modules/@sanity/client/lib/sanityClient.js:89:25) 10:12:42.115 | at new SanityClient (/vercel/path0/node_modules/@sanity/client/lib/sanityClient.js:53:8) 10:12:42.115 | at SanityClient (/vercel/path0/node_modules/@sanity/client/lib/sanityClient.js:50:12) 10:12:42.115 | at Object. (/vercel/path0/next.config.js:2:16) 10:12:42.116 | at Module._compile (node:internal/modules/cjs/loader:1256:14) 10:12:42.116 | at Module._extensions..js (node:internal/modules/cjs/loader:1310:10) 10:12:42.116 | at Module.load (node:internal/modules/cjs/loader:1119:32) 10:12:42.116 | at Module._load (node:internal/modules/cjs/loader:960:12) 10:12:42.116 | at ModuleWrap. (node:internal/modules/esm/translators:169:29) 10:12:42.138 | error Command failed with exit code 1. 10:12:42.139 | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 10:12:42.158 | Error: Command "yarn run build" exited with 1 10:12:42.968
ndimatteo commented 5 months ago

@enterpriseSoftware your error states that the projectId is missing, which implies you did not set up env variables when deploying to Vercel.

Please look at this issue comment for more context: https://github.com/ndimatteo/HULL/issues/119#issuecomment-1452322590