nuxt-hub / cli

Build full-stack Nuxt application with NuxtHub command line interface (CLI).
Apache License 2.0
38 stars 3 forks source link

Remote storage #14

Closed Barbapapazes closed 1 month ago

Barbapapazes commented 2 months ago

sorry for the title but I do not know how to name this issue

Hello,

I deployed a Nuxt application using the GUI from the NuxtHub Admin. Everything was fine. In order to migrate my database, https://github.com/nuxt-hub/core/issues/100, I run nuxt dev --remote locally. I got this issue:

[nuxt:hub 10:21:26 PM]  ERROR  No project URL found, make sure to deploy the project using nuxthub deploy or link your project with nuxthub link or add the deployed URL as NUXT_HUB_PROJECT_URL environment variable (if self-hosted).

nuxthub@0.5.11

So I run npx nuxthub link and I successfully linked my project. A new env variable have been added.

I try again nuxt dev --remote but I got a new error:

have been replaced but was correct and set by the previous command

ℹ Linked to https://admin.hub.nuxt.com/barbapapazes/<project> nuxt:hub 10:24:20 PM
ℹ Using production environment                             nuxt:hub 10:24:20 PM
ℹ Using remote storage from https://<project>.nuxt.dev         nuxt:hub 10:24:20 PM

 ERROR  Failed to fetch remote storage: Project not found.  nuxt:hub 10:24:20 PM
Make sure to deploy the project using nuxthub deploy or add the deployed URL as NUXT_HUB_PROJECT_URL environment variable.

So I follow the error and set NUXT_HUB_PROJECT_URL. I rerun nuxt dev --remote, and a new error:

[nuxt:hub 10:26:23 PM]  ERROR  You cannot use both NUXT_HUB_PROJECT_KEY and NUXT_HUB_PROJECT_URL at the same time. Please use only one of them.

So I remove NUXT_HUB_PROJECT_KEY and now nuxt dev --remote works fine.

I do not know why it was not working as intended after the npx nuxthub link 🤷‍♀️

Atinux commented 1 month ago

Sorry about this, shall be good now with @nuxthub/core@0.5.18