eggnstone / DartFormatJetbrainsPlugin

8 stars 1 forks source link

Failed to start external dart_format: Cannot find the dart_format package: File does not exist at expected location: ~/.pub-cache/bin/dart_format[.sh] #68

Open wdcs-mustaqsaiyed opened 1 week ago

wdcs-mustaqsaiyed commented 1 week ago

Please supply any additional information here, e.g. the source code that caused the error:

OS: Mac OS X Plugin version: 2.0.9 External dart_format version:

ApplicationNinja commented 1 week ago

Same problem here, dart_format installed fine, can run from command line, path correct, etc...

ApplicationNinja commented 1 week ago

From log files, seems like a permissions issue? :

ninjastudio@Ninjas-Mac-Studio T % cat dart_format_2024-06-19_05-25-56_1283.log 2024-06-19 05:25:56.035 Debug: main START 2024-06-19 05:25:56.044 Debug: main/runZonedGuarded START 2024-06-19 05:25:56.051 Debug: No arguments given => Printing usage. 2024-06-19 05:25:56.054 Debug: main/runZonedGuarded END 2024-06-19 05:25:56.055 Debug: main END (ExitCode=9, EncounteredErrorInRunZonedGuarded=false) ninjastudio@Ninjas-Mac-Studio T % cat DartFormatPlugin_2024-06-19_05-34-02_3349.log 2024-06-19 05:34:02.532 DEBUG: StartupActivity.init() 2024-06-19 05:34:03.001 DEBUG: StartupActivity.runActivity() 2024-06-19 05:34:03.003 DEBUG: ExternalDartFormat.init() 2024-06-19 05:34:03.004 DEBUG: ExternalDartFormat.run: START 2024-06-19 05:34:03.005 DEBUG: OsTools.getExternalDartFormatFilePathOrException() 2024-06-19 05:34:03.005 DEBUG: IsWindows: false (Mac OS X) 2024-06-19 05:34:03.005 DEBUG: externalDartFormatFilePath: ~/.pub-cache/bin/dart_format.sh 2024-06-19 05:34:03.005 DEBUG: externalDartFormatFilePath: ~/.pub-cache/bin/dart_format 2024-06-19 05:34:03.010 ERROR: Error-Notification: Failed to start external dart_format: Cannot find the dart_format package: File does not exist at expected location: ~/.pub-cache/bin/dart_format[.sh] 2024-06-19 05:34:03.010 ERROR: Did you install the dart_format package?|Basically just execute this:

dart pub global activate dart_format

eggnstone commented 1 week ago

Sorry, I don't have a Mac available right now.

Can you look if ~/.pub-cache/bin/dart_format.sh or ~/.pub-cache/bin/dart_format exists? Please tell me exactly which one exists and maybe also the permissions with ls -l ~/.pub-cache/bin/

Maybe I need to call it with bash ~/.pub-cache/bin/dart_format.sh?

ApplicationNinja commented 1 week ago

-rwxr-xr-x 1 ninjastudio staff 684 Jun 19 05:43 dart_format -rwxr-xr-x@ 1 ninjastudio staff 683 Jun 19 05:43 dartformat