docus icon indicating copy to clipboard operation
docus copied to clipboard

[Bug] defineAppConfig is not defined

Open larrasu opened this issue 2 years ago • 7 comments

I'm getting the error: defineAppConfig is not defined.

To reproduce:

  1. Install Docus as is from the docs with npx nuxi@latest init docs -t themes/docus
  2. Run yarn install
  3. Got the error

EDIT: I tried installing with npx nuxi init docs -t themes/docus on an empty parent folder and it worked.

image

larrasu avatar Feb 25 '23 14:02 larrasu

I'm making a new module for Nuxt, but I can't make docs using Docus because of this. It only works if the root folder is empty. Even though the root folder has the same Nuxt version as the docs, it doesn't work.

larrasu avatar Feb 26 '23 10:02 larrasu

I'm making a new module for Nuxt, but I can't make docs using Docus because of this. It only works if the root folder is empty. Even though the root folder has the same Nuxt version as the docs, it doesn't work.

We have the same error for a while but sadly have not found a solution https://github.com/nuxt-themes/docus/issues/680

zoey-kaiser avatar Mar 06 '23 14:03 zoey-kaiser

@danielroe ; it's not the first time I hear from these kind of issues with auto-imports in root project configuration files.

I've also encountered a defineNuxtConfig is undefined in the nuxt/image docs directory lately.

Is there something I'm missing here or a suggested workaround in case this happens?

Thanks 🙏

Tahul avatar May 17 '23 14:05 Tahul

Is there a possibility that there is a .nuxtrc file in a parent directory that sets imports.autoImports=false?

danielroe avatar May 17 '23 15:05 danielroe

Is there a possibility that there is a .nuxtrc file in a parent directory that sets imports.autoImports=false?

Yes there is! Can we override it with a new .nuxtrc in the docs subfolder? If yes it may make sense to include a default one when generating a new docus project to avoid confusion.

zoey-kaiser avatar May 17 '23 22:05 zoey-kaiser

Absolutely, you can. :+1:

Here's an example: https://stackblitz.com/edit/github-jhx2ud

danielroe avatar May 18 '23 12:05 danielroe

I got the same problem before. It seems to be solved when i updated the version to the latest 1.14.4.

1714080902120 avatar Aug 01 '23 04:08 1714080902120