The Be Sure Blog

Code Snippets | Problem Solving | Tips & Tricks

The Be Sure Blog banner

My Nuxt 3 fix for npm ERR! Invalid comparator: latest

posted on 3.2.2023 by Below Surface in "Nuxt"

After starting the Nuxt 3 project on another computer with:

$ npx nuxi init <project-name>

And having the project on GitHub, I wanted to clone it on my main computer and when trying

$ npm i

I got the error:

npm ERR! Invalid comparator: latest

Reason: nuxi was not installed on this machine yet. After initializing another project, it asked me to install nuxi first. After doing that I returned to the original repository and tried again. Now it worked!

Tags:

Nuxt 3
Vue.js
npm error

Sources:

https://nuxt.com/docs/getting-started/installation

More posts of this category

Use environmental variables in Nuxt 3

Learn about .env, runtimeConfig and the setup() method

Nuxt

Pm2: Make your Nuxt 3 live app run on a port other than 3000

A five hour research solution for switching the live port to 3002

Nuxt

How to add HTML head data to a Nuxt 3 app

Learn how to set the important SEO data

Nuxt