Help with exporting composable from Custom Module [Still need help]

Hey so I am working on a Nuxt 3 Module that adds support for Neo4J. I have come pretty far and the Module is on npm and also on github https://github.com/DerSimeon/NeoNuxt Unfortunately when I try to use it, I get this error: Package subpath './dist/runtime/server/composables/NeoDriver' is not defined by "exports" in G:\Project X\Web\apply\node_modules\neonuxt\package.json imported from G:\Project X\Web\apply\.nuxt\dev\index.mjs Does anyone know how to fix it?
26 Replies
Just Simeon
Just SimeonOP6mo ago
GitHub
NeoNuxt/src/runtime/server/composables/NeoDriver.ts at main · DerSi...
A Simple Neo4J Module for Nuxt. Contribute to DerSimeon/NeoNuxt development by creating an account on GitHub.
Just Simeon
Just SimeonOP6mo ago
bump
xibman
xibman6mo ago
@Just Simeon composables does not exist in server folder. You can put it in server/utils/{composable}
Just Simeon
Just SimeonOP6mo ago
Do I have to change something else besides the location?
xibman
xibman6mo ago
i think it'is okay
Just Simeon
Just SimeonOP6mo ago
No description
Just Simeon
Just SimeonOP6mo ago
now its not being exported at all
xibman
xibman6mo ago
you need to relaunch your server
xibman
xibman6mo ago
Nuxt
server/ · Nuxt Directory Structure
The server/ directory is used to register API and server handlers to your application.
Just Simeon
Just SimeonOP6mo ago
okay now it let me import it, but its still complaining:
No description
xibman
xibman6mo ago
you dont need to import it
Just Simeon
Just SimeonOP6mo ago
No description
xibman
xibman6mo ago
nuxt do it for you
Just Simeon
Just SimeonOP6mo ago
is there a way to get rid of the error tho? because it would be super annoying if the error is there the whole time
xibman
xibman6mo ago
refresh your ide
Just Simeon
Just SimeonOP6mo ago
still happening
xibman
xibman6mo ago
you cvan import it but you have an error in yout ide ??
Just Simeon
Just SimeonOP6mo ago
as you can see in the screenshots: If I don't import it, it says Cannot find name withNeoDriver and if I do import it, it says Vue: Cannot find module neonuxt/dist/runtime/server/utils/NeoDriver or its corresponding type declarations.
xibman
xibman6mo ago
did you have the next file in your server folder : https://nuxt.com/docs/guide/directory-structure/server#server-types
Nuxt
server/ · Nuxt Directory Structure
The server/ directory is used to register API and server handlers to your application.
Just Simeon
Just SimeonOP6mo ago
what is the "next file"?
xibman
xibman6mo ago
server/tsconfig.json check link
Just Simeon
Just SimeonOP6mo ago
Yes I have a tsconfig.json in src/runtime/server what now?
xibman
xibman6mo ago
do you restart your ide ?
Just Simeon
Just SimeonOP6mo ago
yes twice
xibman
xibman6mo ago
weird
Just Simeon
Just SimeonOP6mo ago
Maybe someone else has an Idea? bump
Want results from more Discord servers?
Add your server