xcsob
xcsob

Reputation: 925

Accidentally deleted pub-cache in Flutter sdk

I accidentally deleted the pub-cache in my flutter sdk and now whenever I try to run my flutter app on the web I receive this error:

Finished with error: Invalid argument(s): A directory corresponding to fileSystemPath "/Users/xxxxx/flutter/.pub-cache/hosted/pub.dartlang.org/devtools-0.1.15/build" could not be found

How can I resolve this issue?

I already tried to restore the pub-cache but it doesn't work.

How can I solve this?

Upvotes: 1

Views: 6384

Answers (3)

Victor Ruiz.
Victor Ruiz.

Reputation: 1722

I did solve the problem downloading again.

  1. Deleted the SDK folder
  2. Fresh Install of the SDK.

    https://flutter.dev/docs/get-started/install/macos

Upvotes: 1

xcsob
xcsob

Reputation: 925

I managed to solve the problem by downloading the flutter sdk again and adding web support.

Upvotes: 2

Christopher Moore
Christopher Moore

Reputation: 17113

Use flutter pub cache repair. It should solve the issue. See pub cache for reference.

Upvotes: 6

Related Questions