Build Failing: Persistent Type Error in d3-dispatch dependency

Hello Vercel Team,

My project is consistently failing to build due to a TypeScript error, and I believe it’s caused by an issue with the build cache.

Project: https://github.com/Laxman-1998/opinioator Latest Failed Build Log: (Provide the URL to the deployment log you just shared)

Problem: The build always fails with a Type error: Type parameter declaration expected. in the dependency @types/d3-dispatch.

Troubleshooting Steps Taken: I have worked extensively to resolve this and can confirm the issue is not in my code or local setup. We have tried the following, all of which resulted in the same build error:

  1. Dependency Override: I am using an overrides block in my package.json to force a known-good version of the problematic package (@types/d3-dispatch: "3.0.7").
  2. Lockfile Regeneration: I have deleted and completely regenerated my package-lock.json multiple times to ensure it’s correct and pushed it to GitHub. You can see this in my commit history.
  3. Manual Cache Clearing: I have tried redeploying from the dashboard with the “Use existing Build Cache” option unchecked.
  4. Build Command Change: I have changed my build command in package.json to "echo 'Busting cache...' && next build" specifically to invalidate the cache.

Key Finding: Despite all these steps, every single build log—even after changing the build command—shows the line Restored build cache from previous deployment. The build environment seems to be ignoring the correct package-lock.json and the cache invalidation triggers.

Could you please investigate the build environment for this project and consider purging the build cache on your end?

Hello,

This issue has now become critical. As a final debugging step, I completely uninstalled the problematic d3 dependencies from my package.json and pushed the change in commit 7deb823.

The new build log shows that Vercel is still restoring a build cache and failing with the same error from the d3 dependency that no longer exists in my project.

This proves the build environment is stuck and ignoring repository changes. Please, can you escalate this and purge the build cache for my project? I am completely blocked.

Have you tried 3.0.6?

Hello @franciscoed, thank you for trying to help.

As shown in my previous replies, changing the version number will not work.

The core problem is this: My Vercel build is using a cache that contains dependencies I have already uninstalled from my project.

The issue is with the Vercel build environment, not my code. My project is completely blocked.

Can an official Vercel staff member please investigate and purge the build cache for this project?

Hi @laxman-1998 ! Try with "@types/d3-dispatch": "3.0.2", in your package.json. It worked for me. The issue occurred due to latest update to @types/d3-dispatch which was published 5 days ago.

Thank you very much. Changing the version of @types/d3-dispatch worked for me. I already reverted to the version prior to the latest, which is 3.0.6 and added the following configuration to the package.json file:

"overrides": {
		"@types/d3-dispatch": "3.0.6"
	}

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.