Remote storage for preview environment not working in workers project
Describe the bug
I have a deployed workers project that uses production and preview environments.
Following the documentation, when I run npx nuxt dev --remote=preview, it connects to the production environment's remote storage instead of the preview environment.
Steps to reproduce Steps to reproduce the behavior:
- Run
npx nuxt dev --remote=preview
The console displays Using production environment and it actually connects to the production environment.
note: nuxthub/core version: "@nuxthub/core": "0.9.0"
Expected behavior
When --remote=preview is specified, it should connect to the preview environment.
I have the same issue.
export default defineNuxtConfig({
$development: {
hub: {
remote: "preview",
},
},
});
ℹ Using production environment
ℹ Using remote storage from https://project-name.account-name.workers.dev
https://project-name-preview.account-name.workers.dev is expected?
Thanks for letting us know about this bug - I'm taking a look into it
With the introduction of NuxtHub v0.10 which supports multiple clouds, we're sunsetting NuxtHub Admin. If you stay on NuxtHub v0.9.1 you can specify the project URL for the environment directly:
https://legacy.hub.nuxt.com/docs/getting-started/remote-storage#set-the-project-url
And on NuxtHub v0.10 you can use Nuxt environment overrides/specify custom .env files to connect to different resources.