N
Nuxt4w ago
Alex

Nuxthub and Nuxt UI Pro licenses builds failing

Hi, I've bought a license yesterday. Today, I tried to add it to my Nuxthub project, however, I'm constantly getting the error: Error: Missing NUXT_UI_PRO_LICENSE license key. When I explore the Secrets and variables > Actions > Variables I can see that my license is there. Then, I tried to clone the Atinotes template on Nuxthub and got the same issue. All the env variables are in the repo but the build still fails. What am I missing?
No description
5 Replies
kapa.ai
kapa.ai4w ago
Hi @Alex. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- I understand you're having issues with your Nuxt UI Pro license when deploying to NuxtHub. Let me help you troubleshoot this problem. Based on the information provided, it seems that while you've added your license key to GitHub Actions variables, the build process isn't accessing it correctly. This is a common issue when working with environment variables in deployment environments. Possible solutions: 1. Check environment variable format Make sure your environment variable is correctly named as NUXT_UI_PRO_LICENSE (exactly as shown) in your NuxtHub project settings. The error message specifically mentions this variable is missing during build. 2. Environment variable location For NuxtHub deployments, you need to ensure the environment variable is set in the correct location: - When deploying to NuxtHub, the NUXT_UI_PRO_LICENSE variable should be suggested during deployment as mentioned in the documentation Installation guide for Nuxt UI Pro. 3. Docker/Deployment configuration If you're using a custom deployment setup, make sure the environment variables are properly passed to the build environment. The issue might be related to how environment variables are handled in the build process. As mentioned in a similar issue with environment variables in Nuxt, sometimes there can be issues with how environment variables are passed through Docker or other containerization systems during build time versus runtime GitHub Issue #30605. 4. Verify license activation Ensure you've properly activated your license at https://ui.nuxt.com/pro/activate with your GitHub username and license key as mentioned in the Activate your Nuxt UI Pro License documentation. 5. Alternative license configuration If setting the environment variable isn't working, you can try setting your license directly in your nuxt.config.ts file:
export default defineNuxtConfig({
extends: ['@nuxt/ui-pro'],
uiPro: {
license: 'your-license-key'
}
})
export default defineNuxtConfig({
extends: ['@nuxt/ui-pro'],
uiPro: {
license: 'your-license-key'
}
})
This approach is documented in the Options section of the installation guide. If you continue to experience issues after trying these solutions, you might want to reach out to NuxtHub support directly as there might be a specific configuration needed for their platform that isn't covered in the general documentation. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai4w ago
<@319451898790936576> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
Alex
AlexOP4w ago
This is the github workflow: name: Deploy to NuxtHub on: push jobs: deploy: name: "Deploy to NuxtHub" runs-on: ubuntu-latest environment: name: ${{ github.ref == 'refs/heads/main' && 'production' || 'preview' }} url: ${{ steps.deploy.outputs.deployment-url }} permissions: contents: read id-token: write steps: - uses: actions/checkout@v4 - name: Install pnpm uses: pnpm/action-setup@v4 - name: Install Node.js uses: actions/setup-node@v4 with: node-version: 22 cache: 'pnpm' - name: Install dependencies run: pnpm install - name: Ensure NuxtHub module is installed run: pnpx nuxthub@latest ensure - name: Build application run: pnpm build - name: Deploy to NuxtHub uses: nuxt-hub/action@v1 id: deploy with: project-key: nuxthub-markdow-o91i There's no mention of the license ky here. OK. The found the issue. The workflow template does not contain the env variables for the build. They need to be added "manually". I had to add this lines to the workflow file (right after "runs-on ubuntu-latest". env: NUXT_UI_PRO_LICENSE: ${{ vars.NUXT_UI_PRO_LICENSE }}
xmatthias
xmatthias4w ago
NUXT_UI_PRO_LICENSE: ${{ vars.NUXT_UI_PRO_LICENSE }}
i think, this should be NUXT_UI_PRO_LICENSE: ${{ secrets.NUXT_UI_PRO_LICENSE }} ? Assuming you should treat the license key as secret ... which gives it (a little) extra protection in github action outputs 😉
Mak
Mak4w ago
I don't understand how that license can protect?

Did you find this page helpful?