nuxt-hub / core

Build full-stack applications with Nuxt on CloudFlare, with zero configuration.
https://hub.nuxt.com
Apache License 2.0
993 stars 57 forks source link

Make sure to provide a valid NUXT_HUB_PROJECT_SECRET_KEY or being logged in with npx nuxthub login #335

Closed aligzl closed 1 month ago

aligzl commented 1 month ago

Describe the bug I am getting this error after new deployment in local even from the admin dashboard all-nuxt hub features being disabled itself.

Make sure to provide a valid NUXT_HUB_PROJECT_SECRET_KEY or being logged in with npx nuxthub login

my package.json

"dependencies": {
    "@cloudflare/puppeteer": "^0.0.14",
    "@nuxt/ui-pro": "^1.4.4",
    "@vueuse/nuxt": "^11.1.0",
    "date-fns": "^4.1.0",
    "maska": "^3.0.3",
    "nuxt": "^3.13.2",
    "nuxt-auth-utils": "^0.5.0",
    "nuxt-security": "^2.0.0",
    "puppeteer": "^23.6.0",
    "ua-parser-js": "^1.0.39",
    "v-calendar": "^3.1.2",
    "vue-router": "^4.4.5",
    "yup": "^1.4.0"
  },
  "devDependencies": {
    "@iconify-json/heroicons": "^1.2.1",
    "@iconify-json/mdi": "^1.2.1",
    "@iconify-json/vscode-icons": "^1.2.2",
    "@nuxt/eslint": "^0.6.0",
    "@nuxt/fonts": "^0.10.0",
    "@nuxt/icon": "^1.5.6",
    "@nuxthub/core": "^0.7.34",
    "@nuxtjs/i18n": "^8.5.5",
    "eslint": "^9.13.0",
    "typescript": "^5.6.3",
    "vue-tsc": "^2.1.6",
    "wrangler": "^3.81.0"
  }

nuxt.config.ts

modules: [
    '@nuxthub/core',
    '@nuxt/eslint',
    '@nuxt/fonts',
    '@nuxt/ui',
    '@vueuse/nuxt',
    '@nuxtjs/i18n',
    !isDev && 'nuxt-security',
    'nuxt-auth-utils'
  ],

  $development: {
    runtimeConfig: {
      public: {
      }
    },
    hub: {
      remote: true
    }
  },

  hub: {
    database: true,
    blob: true,
    browser: true,
    kv: true
  },
atinux commented 1 month ago

I am sorry but I cannot reproduce, what version of the CLI are you using?

Could you try with npx nuxthub@latest login ?

aligzl commented 1 month ago

Ohh sory my bad, i added route guard at /api routes only for logged in users then this happenned. Maybe it might be a good reason to add that to docs about hub routes so people can aware

Thanks for the great job!