Edgio

Nuxt3

This guide shows you how to deploy a Nuxt3 application to Edgio.

Example

Connector

This framework has a connector developed for Edgio. See Connectors for more information.

Prerequisites

Setup requires:

Install the Edgio CLI

If you have not already done so, install the Edgio CLI.
Bash
1npm i -g @edgio/cli@^6.0.0

Getting Started

Follow the instructions to create a new Nuxt3 application, run it in a local dev server, and deploy to Edgio.

1. Create a new Nuxt3 application

To create a new Nuxt3 application, run:
Bash
1npx nuxi init <app-name>
Note: Learn more about npx and Creating a new Nuxt3 project.
After the installation is complete, change directory to the new project:
Bash
1cd <app-name> // Change to the directory of your new application
Then install dependencies with the command:
Bash
1npm install # yarn install

2. Add Edgio to the Nuxt3 application

To add Edgio to the Nuxt3 application, run:
Bash
1edgio init --edgioVersion ^6.0.0

3. Run the Nuxt3 app locally with Edgio

To run the Nuxt3 app locally with Edgio, run:
Bash
1edgio dev
Vist http://localhost:3000 to view the application.

4. Run the Nuxt3 app in local production mode with Edgio

To run the Nuxt3 app in local production mode with Edgio, run:
Bash
1edgio build && edgio run --production

5. Deploy the Nuxt3 app to Edgio

Note: Add or update the name field in the package.json file.
Deploy your app to Edgio by running the following command in your project’s root directory:
Bash
1edgio deploy
See Deployments for more information.

Resources

  1. Routing with EdgeJS
  2. Prefetching with EdgeJS

Troubleshoot

Error: Variable siteSlug of type String! was provided invalid value

This error throws on deployment with 0 deploy. To fix this:
  • Add/Update the name field in the package.json file, OR
  • Deploy with the name flag, via, 0 deploy --name=site-slug

tsconfig.json:3:13: warning: Cannot find base config file ”./.nuxt/tsconfig.json”

This is a resolved Nuxt3 error. More on this GitHub Issue.