#"does not provide an export named "

18 messages · Page 1 of 1 (latest)

foggy marlin
#

error when a try to import a variable to another vue file

elder radish
#

Did you mean to write "~/components/…"?

foggy marlin
#

I already tried using the full path from /users to file.vue

elder radish
#

The path you import from is not relevant to what OS you’re using. It’s what Nuxt regards as an alias to the root of your workspace.

elder radish
#

Yep. Try it.

foggy marlin
#

same error

elder radish
#

Looks like you’re not exporting hachiName as a named export. How are you exporting it in that Vue file?

foggy marlin
#

im newbie with nuxt

#

I just created the variable and used "export" before

elder radish
#

Is the export within script setup?

#

If so, that won’t work. You’ll have to create a normal <script> as well and export from there. Or as a better practice, place in a mutual js/ts file such as utils? You’d be saving yourself a lot of aggravation

foggy marlin
undone ruin
#

you don't need to import it