Skip to content

mandarini/nuxi-bug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nuxi regression with cwd

This is a repository which contains the following:

  1. A script that calls nuxi programmatically with runCommand
  2. A nuxt application (my-nuxt-app).
  3. The nuxt app contains just a page that says "Hello from Katerina", here is the code: my-nuxt-app/app.vue

Install dependencies

pnpm i

and in the nuxt app:

cd my-nuxt-app && pnpm i

The issue

Using "nuxi": "^3.9.1" and runCommand("dev", ["my-nuxt-app"]), runCommand ignores the name of the project (the directory), and runs the command in the root directory.

I would expect this to work exactly like running:

npx nuxi dev my-nuxt-app

If you run the above command, you will see that it works as expected.

If you run

npx tsx run-nuxt.ts

you will see that it does not pick up the directory, and runs the command in the root directory, it shows the default Nuxt template, instead of "Hello from Katerina".

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published