vibesdk icon indicating copy to clipboard operation
vibesdk copied to clipboard

Dependencies are imported but could not be resolved

Open stevgon opened this issue 4 months ago • 1 comments

Description

This has been a recurring error for some time. At one point, I asked the agent to create a more advanced table component, and it started using @tanstack/react-table.


Behavior

Sometimes, the agent reports the following:

My apologies, but the application is currently encountering a critical build error:

    Error: The following dependencies are imported but could not be resolved: @tanstack/react-table

This error is preventing the application from building and running, which means I couldn't implement or test the optimizations [...]

My immediate priority must be to resolve this @tanstack/react-table dependency issue first. Once the application is building successfully, I can then proceed with optimizing those endpoints.

Then, it proceeds to fix the issue and reports:

The @tanstack/react-table dependency error is no longer present, and the application has deployed successfully.

Now that the build is stable, I can proceed with optimizing the /api/audit-logs and /api/dashboard-stats endpoints [...]

.bootstrap.js Contents

const commands = [
    "bun install @tanstack/react-table",
    "bun install --force",
    "bun install date-fns"
];

(Note: date-fns sometimes has the same problem.)


Observations

After a few more changes, the same dependency errors come back. My guess is that the sandbox is trying to run the app before these setup commands have finished, which triggers errors that the agent then sees — even though the app eventually loads successfully in the preview.

So I think that the agent is reacting to stale build errors that no longer reflect the current state of the environment.

stevgon avatar Oct 31 '25 14:10 stevgon

the sandbox is trying to run the app before these setup commands have finished, which triggers errors

That shouldn't be happening because I remember awaiting that call. I would debug this further though, thanks for making the issue!

AshishKumar4 avatar Oct 31 '25 17:10 AshishKumar4