#defineNuxtPlugin is not defined

14 messages · Page 1 of 1 (latest)

mild ravine
#

Why would a module I write that uses "addPlugin" cause this issue?

defineNuxtPlugin is not defined

It works fine in the development mode in the playground but bombs when I implement it as a package.

#

Also, it's the same with something like ref - why do I have to import all the things when it's a module?

rain aspen
#

Auto-imports are not enabled for files within node_modules

#

So you have to explicitly import them

dim stratus
#

+you shouldn’t import them from #imports if you do, just use them

mild ravine
# rain aspen Auto-imports are not enabled for files within `node_modules`

Thanks so much @rain aspen - You were totally right on. I found the note in the docs after posting here - not sure how I missed that. Thanks again for clearing that up.

I am now getting a really odd error on the application implementing my code: ERROR: Could not resolve "#imports" It gripes about this in three composables. I've tripled checked and I don't think they are being used outside of a setup function.

mild ravine
dim stratus
mild ravine
#

AutoImports has been disabled

#

But in a few places where I'm doing something like import { useCookie } from '#imports' I'm getting ERROR: Could not resolve "#imports"

#

Just want to confirm @dim stratus - if auto-imports are disabled I do have to import them from #imports, correct?

dim stratus
mild ravine