cannot start nuxt after pnpm i

Cannot start nuxt: Cannot resolve module "vite-plugin-vue-tracer/client/record"
2 Replies
kapa.ai
kapa.ai2w ago
Hi @salomon_.. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- It looks like you're experiencing a dependency resolution issue with your Nuxt project after running pnpm install. This error is related to the Vite plugin system that Nuxt uses. Based on the knowledge sources, this could be caused by a few different issues: 1. Missing or incompatible dependencies: Similar to issues mentioned in the knowledge sources, you might be experiencing a problem where certain dependencies can't be found or resolved properly when using pnpm. 2. Package hoisting issues: As mentioned in this GitHub issue, pnpm sometimes requires the shamefully-hoist=true flag to work properly with Nuxt modules. Here are some potential solutions: Try these fixes: 1. Add shamefully-hoist to your pnpm configuration: Create or edit .npmrc file in your project root and add:
shamefully-hoist=true

shamefully-hoist=true

Then run pnpm install again. 2. Clear your cache and reinstall:
pnpm store prune
rm -rf node_modules
pnpm install

pnpm store prune
rm -rf node_modules
pnpm install

3. Check for version conflicts: The error suggests an issue with vite-plugin-vue-tracer. Make sure your Nuxt and Vite plugin versions are compatible. As seen in this PR, Nuxt regularly updates its Vite plugin dependencies. 4. Check your .dockerignore file: If you're using Docker, make sure you have a proper .dockerignore file that doesn't exclude necessary files but does exclude the local node_modules folder, as mentioned in this Stack Overflow post. 5. Try specifying the exact version of problematic dependencies: You might need to pin specific versions of dependencies in your package.json, similar to the solution mentioned in this GitHub issue. If none of these solutions work, you might want to create a minimal reproduction of your issue and share it on the Nuxt GitHub repository for more specific help. Let me know if any of these solutions work for you! ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai2w ago
<@1029431292170874910> Kapa.ai is still learning and improving, please let me know how I did by reacting below.

Did you find this page helpful?