Describe your question/issue in detail
I'm trying to make use of GitHub Codespaces to work on NextJS/Prismic projects. I can get Slice Machine up and running via Codespaces, however, when I log into Prismic via slice machine, the following error occurs:
Errors
It looks like your CLI is unreachable, please refresh the page.
The URL for this login is: https://prismic.io/dashboard/cli/login?source=slice-machine&port=9999&path=/api/auth
and is coming from https://hany-zalibut-xx5vvqwvx636gvr-9999.app.github.dev/
When running prismic login via CLI in codespace, the following error results:
➜ /workspaces/prismic-reponame-here(main) $ prismic login
Prismic: Press any key to open up the browser to login or q to exit:
Opening browser to https://prismic.io/dashboard/cli/login?port=5555
Prismic: Logging in... done
node:internal/child_process:286
const err = new ErrnoException(exitCode, syscall);
^
Error: spawn xdg-open ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:286:19)
at onErrorNT (node:internal/child_process:484:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn xdg-open',
path: 'xdg-open',
spawnargs: [ 'https://prismic.io/dashboard/cli/login?port=5555' ]
}
Are there steps we can take to make this work with codespaces? Perhaps adjusting the login URL attributes in some way?
Steps to reproduce
- Go to a GH repo that you have using Next and Prismic.
- Click the green code button.
- Click green Create codespace on main button
- Installation of dependencies happens automatically via NPM (cancel and use your preferred package manager if necessary)
- Run you dev script
- Launch your slicemachine (codespaces will do this in a new tab with forwarding handled)
- In slicemachine, click log into prismic