No, you don't need to run npm install manually. The v0 sandbox automatically detects changes to package.json and installs the new dependencies for you.
The system handles dependency installation at the end of each turn - when you add packages either through imports in your code files or by directly editing package.json, the auto-installer will pick them up and install them automatically.
Just wait a few seconds for the dev server to detect the changes and reinstall dependencies. You should see the preview refresh once the packages are installed and the server recompiles.
Now let me check the debug logs to see what error is occurring:
I found the issue. Looking at the code and logs:
"use client" directive in generate-deal-pdf.ts - This is a server-side utility but it's being imported in a client component and uses browser APIs. It needs the "use client" directive.jsPDF operations might be throwing an error if the libraries aren't properly initialized.Let me fix the generate-deal-pdf.ts file:
Now let me add error handling to the PDF generation function to catch any issues:
Now I need to close the try-catch at the end of the function. Let me find the end of the function:
I've fixed the issues with the PDF generator:
Changes made:
"use client" directive at the top of generate-deal-pdf.ts so it can be executed in the browserNow when you click "Download PDF", it should work properly. If there are still issues, the error will be logged to your browser console (press F12 to open Developer Tools → Console tab) showing the exact error message. Try clicking the Download PDF button now and let me know if you see any console errors.