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 SimeonOP5mo 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 SimeonOP5mo ago
bump
xibman
xibman5mo ago
@Just Simeon composables does not exist in server folder. You can put it in server/utils/{composable}
Just Simeon
Just SimeonOP5mo ago
Do I have to change something else besides the location?
xibman
xibman5mo ago
i think it'is okay
Just Simeon
Just SimeonOP5mo ago
No description
Just Simeon
Just SimeonOP5mo ago
now its not being exported at all
xibman
xibman5mo ago
you need to relaunch your server
xibman
xibman5mo ago
Nuxt
server/ · Nuxt Directory Structure
The server/ directory is used to register API and server handlers to your application.
Just Simeon
Just SimeonOP5mo ago
okay now it let me import it, but its still complaining:
No description
xibman
xibman5mo ago
you dont need to import it
Just Simeon
Just SimeonOP5mo ago
No description
xibman
xibman5mo ago
nuxt do it for you
Just Simeon
Just SimeonOP5mo 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
xibman5mo ago
refresh your ide
Just Simeon
Just SimeonOP5mo ago
still happening
xibman
xibman5mo ago
you cvan import it but you have an error in yout ide ??
Just Simeon
Just SimeonOP5mo 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
xibman5mo 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 SimeonOP5mo ago
what is the "next file"?
xibman
xibman5mo ago
server/tsconfig.json check link
Just Simeon
Just SimeonOP5mo ago
Yes I have a tsconfig.json in src/runtime/server what now?
xibman
xibman5mo ago
do you restart your ide ?
Just Simeon
Just SimeonOP5mo ago
yes twice
xibman
xibman5mo ago
weird
Just Simeon
Just SimeonOP5mo ago
Maybe someone else has an Idea? bump
Want results from more Discord servers?
Add your server