Problems with persistent cache when publishing

Hi!
I am experiencing a persistent build issue when trying to publish my application. The build process fails with a “Module not found” error, but the error message is inconsistent with the actual content of the source files. This strongly suggests a server-side build cache issue.

The Problem:

The build log reports the following error:

Module not found: Can't resolve './logo' in /workspace/src/components/medicoach/patient-selection.tsx

However, the file patient-selection.tsx does not contain this relative import. It correctly uses an alias import, as shown here: import { Logo } from '@/components/core/logo';

The build process seems to be using an incorrect version of the file from its cache, rather than the current, correct version in my workspace.

Troubleshooting Steps Taken:

I have already attempted all standard methods to clear the cache, with no success:

  1. Deleted the .next directory: Manually removed the entire .next directory from the workspace. The error persisted on the next publish attempt.

  2. Modified package.json: Changed a dependency version to force a full re-install and build. The error persisted.

  3. Modified tsconfig.json: Altered compiler options to try and invalidate the build cache. The error persisted.

Does anyone have any other suggestions?

Regards
Jonas

try look in your app to see if u have this folder /workspace . if yes , delete the folder and it’s content .