SimeonGriggs / sanity-react-router-template

Sanity Studio v3 embedded into a Remix Vite application configured for Vercel hosting with visual editing
https://sanity-remix-template.sanity.build
164 stars 35 forks source link

TypeError: Invalid URL #50

Closed cperry0 closed 11 months ago

cperry0 commented 11 months ago

Not familiar with remix or typescript, not sure how to fix/find this invalid url.... or if I missed a step? Followed install instructions as written, when executing "npm run dev" VS Code fails with:

TypeError: Invalid URL at new URL (node:internal/url:783:36) at app/sanity/projectDetails.ts (/Users/cperry/Projects/Developer/CMS/SanityDemo/my-remix-app/app/sanity/projectDetails.ts:64:3) at /Users/cperry/Projects/Developer/CMS/SanityDemo/my-remix-app/build/index.js:7:56 at app/sanity/client.ts (/Users/cperry/Projects/Developer/CMS/SanityDemo/my-remix-app/app/sanity/client.ts:3:1) at /Users/cperry/Projects/Developer/CMS/SanityDemo/my-remix-app/build/index.js:7:56 at Object. (/Users/cperry/Projects/Developer/CMS/SanityDemo/my-remix-app/app/sanity/loader.server.ts:3:1) at Module._compile (node:internal/modules/cjs/loader:1376:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1435:10) at Module.load (node:internal/modules/cjs/loader:1207:32) at Function.Module._load (node:internal/modules/cjs/loader:1023:12)

OSX VS Code: Version: 1.85.1 (Universal) Commit: 0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2 Date: 2023-12-13T09:48:06.308Z Electron: 25.9.7 ElectronBuildId: 25551756 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Darwin arm64 23.2.0

cperry0 commented 11 months ago

Oh I see, it has to be hosted on VERCEL.... Then update PRODUCTION_URL in ./app/sanity/projectDetails.ts... {closing}

cperry0 commented 11 months ago

{closing}