Nuxt generate and wrong path
Hi all.
Can anyone point me in the right direction for this issue... (see media)
the joint-plus package for some reason does not have either relative or absolute path
which causes an error on nuxt generate command. Because its looking for it in the wrong directory
This is a third party package. But i dont yet know if its something i can fix, or if it requires them to fix

2 Replies
Hi @leecolarelli. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Based on the information provided in the knowledge sources, it appears you're encountering a path resolution issue when running the
nuxt generate
command with a third-party package called "joint-plus".
This issue is likely related to how Nuxt resolves paths during the static site generation process. When you run nuxt generate
, Nuxt pre-renders every route of your application and stores the results in plain HTML files for static hosting as described in the Nuxt documentation.
The problem you're experiencing seems similar to issues mentioned in a few of the knowledge sources:
1. There was a bug fix in Nuxt related to custom directory configurations in Nitro builds, as mentioned in this PR #18882, which addressed issues with path resolution during preview.
2. Another relevant issue is how Nuxt handles path resolution in layers and third-party packages. According to the Nuxt documentation on layers, when importing using global aliases or relative paths in a layer, they are resolved relative to the user's project paths rather than the layer itself.
For your specific issue with the "joint-plus" package, you might need to:
1. Check if the package is using relative paths or aliases that might be causing resolution issues during the generate process.
2. If you have access to the package code, you could try modifying how it references its resources, using full resolved paths as suggested in the documentation:
3. If this is a third-party package you don't maintain, you might need to contact the package maintainers to fix the path resolution issues, especially if they're not following Nuxt's recommended practices for path handling.
4. As a temporary workaround, you could try using nuxt build
instead of nuxt generate
if your deployment platform supports server-side rendering, as explained in this YouTube video about Nuxt build vs generate.
Without more specific details about the exact error message and the structure of the joint-plus package, it's difficult to provide a more targeted solution. If you can share more details about the error and the package, I might be able to offer more specific guidance.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@396389220429725696> Kapa.ai is still learning and improving, please let me know how I did by reacting below.