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