Troubleshooting
The Morph box doesn't appear#
- Is anyone signed in? Morph only appears for signed-in users. Open
/api/morph-tokenwith a POST from the browser's console (fetch("/api/morph-token", { method: "POST" }).then(r => r.json())):"Not signed in."means your token endpoint returnsnullfor this request (see Connecting your sign-in); aTODO(morph)in that file means it still needs filling in. MORPH_SECRET_KEY is missing: add it to.env.locallocally, or to your host's environment variables in production, then restart or redeploy.- Is the page registered? Run
npx usemorph sync. A page that isn't registered shows your original page without the box. - On your live site only: allow the address with
npx usemorph origins add https://your-app.com.
"Origin … isn't allowed for this company"#
The website in the browser's address bar isn't on your app's list. Add it exactly, including https:// and www if used: npx usemorph origins add https://www.your-app.com.
"Missing section …" on a user's page#
A section the user's saved page uses was removed or renamed in your code. The user can press Reset, or ask for a new layout. To avoid it when renaming, keep the old id: <Section name="New name" id="old_name">.
"This app has used its free AI changes for today"#
The app reached its daily allowance. It resets at midnight UTC; saved pages keep working.
init says a page "has only one part"#
There's nothing to rearrange on that page, at least not from what the page itself renders. If the parts live inside one big component, wrap them in <Section>s inside that component (with a <MorphSurface> around them) and run npx usemorph sync.
init installed with npm instead of pnpm/yarn#
Your project uses a package manager that isn't installed on this machine, so init fell back to npm. Run your package manager's install afterwards to update its lockfile.
The sign-in link says it expired#
Sign-in links last 10 minutes and work once. Run npx @usemorph/cli login again.
Still stuck?#
Open an issue on GitHub with what you ran and what you saw (never include your secret key).