N
Nuxt3w ago
BaxSTAR

Co-worker pulled changes from my nuxt project, but is now getting errors when I didn't

My nuxt project was working fine on my end but when he pulled my changes, he suddenly getting these errors and I can't find any context about them:
ERROR: Pre-transform error: [unimport] failed to find "useSupabaseSessions" imported from "#imports"
ERROR: Pre-transform error: [unimport] failed to find "useSupabaseSessions" imported from "#imports"
ERROR: (node:15780) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
ERROR: (node:15780) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
3 Replies
kapa.ai
kapa.ai3w ago
Hi @BaxSTAR. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- I can help you troubleshoot these errors your co-worker is experiencing after pulling your Nuxt project changes. Auto-import Error The first error is related to Nuxt's auto-import feature. The error indicates that the system is trying to import useSupabaseSessions but can't find it:
ERROR: Pre-transform error: [unimport] failed to find "useSupabaseSessions" imported from "#imports"
ERROR: Pre-transform error: [unimport] failed to find "useSupabaseSessions" imported from "#imports"
This is likely happening because: 1. Your co-worker might be missing a dependency that provides this composable 2. There might be a difference in your node_modules structure or package versions To fix this, try these steps: 1. Make sure your co-worker has installed all dependencies:
npm install
# or yarn install
# or pnpm install

npm install
# or yarn install
# or pnpm install

2. If you're using a custom composable, ensure it's properly placed in the composables/ directory, as Nuxt auto-imports from this location as documented here. 3. If it's from a third-party package, you might need to explicitly configure auto-imports in your nuxt.config.ts:
export default defineNuxtConfig({
imports: {
presets: [
{
from: 'your-supabase-package',
imports: ['useSupabaseSessions']
}
]
}
})
export default defineNuxtConfig({
imports: {
presets: [
{
from: 'your-supabase-package',
imports: ['useSupabaseSessions']
}
]
}
})
Punycode Deprecation Warning The second error is a Node.js deprecation warning:
ERROR: (node:15780) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
ERROR: (node:15780) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
This is a known issue with Node.js v22+ as seen in this GitHub issue. The warning comes from dependencies that use the deprecated punycode module. It doesn't break functionality but shows as a warning. This typically comes from dependencies like eslint, ajv, and uri-js that are used by Nuxt's build tools. Possible Solutions 1. For both issues: Try clearing node_modules and reinstalling dependencies:
rm -rf node_modules
npm install

rm -rf node_modules
npm install

2. For the auto-import issue: Check if you're using any custom imports that might not be properly set up in your co-worker's environment. 3. For the punycode warning: This is just a warning and shouldn't affect functionality. You can: - Use an earlier Node.js version (pre-v22) - Ignore the warning as it's coming from dependencies and not directly from your code 4. Check package manager: Ensure you're both using the same package manager (npm, yarn, or pnpm) as mixing them can sometimes cause dependency resolution issues. 5. Check for local environment differences: Environment variables or local configurations might be causing the difference in behavior. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai3w ago
<@291863234900787200> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
BaxSTAR
BaxSTAROP3w ago
i saw the problem, me and my co-worker's individual copies of the imports.d.ts file inside our respective .nuxt folders have different imports, he's missing some imports in his copy

Did you find this page helpful?