Answer a question

I get these error messages every time I view the code of third party flutter packages (in .pub-cache folder):

[Error - 7:19:24 PM] Request textDocument/documentSymbol failed.
  Message: Invalid file path
  Code: -32003 
/Users/benjaminfarquhar/development/flutter/.pub-cache/hosted/pub.dartlang.org/hive-1.4.4+1/lib/src/hive_impl.dart
[Error - 7:19:24 PM] Request textDocument/codeAction failed.
  Message: Invalid file path
  Code: -32003 
/Users/benjaminfarquhar/development/flutter/.pub-cache/hosted/pub.dartlang.org/hive-1.4.4+1/lib/src/hive_impl.dart
[Error - 7:19:24 PM] Request textDocument/hover failed.
  Message: Invalid file path
  Code: -32003 
/Users/benjaminfarquhar/development/flutter/.pub-cache/hosted/pub.dartlang.org/hive-1.4.4+1/lib/src/hive_impl.dart
[Error - 7:19:25 PM] Request textDocument/hover failed.
  Message: Invalid file path
  Code: -32003 
/Users/benjaminfarquhar/development/flutter/.pub-cache/hosted/pub.dartlang.org/hive-1.4.4+1/lib/src/hive_impl.dart
[Error - 7:19:33 PM] Request textDocument/hover failed.
  Message: Invalid file path
  Code: -32003 
/Users/benjaminfarquhar/development/flutter/.pub-cache/hosted/pub.dartlang.org/hive-1.4.4+1/lib/src/hive_impl.dart

I didn't use to get them. Any ideas on how to fix?

I have tried changing the settings.json dart sdk setting from null to my dart sdk location: "dart.sdkPath": "/usr/local/opt/dart/libexec", but it didn't work.

Answers

This was a bug (see https://github.com/Dart-Code/Dart-Code/issues/2764) when using the LSP Preview. It's been fixed, although the fix might not have reached the stable version of Flutter yet.

Logo

开发云社区提供前沿行业资讯和优质的学习知识,同时提供优质稳定、价格优惠的云主机、数据库、网络、云储存等云服务产品

更多推荐