File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,8 @@ let codeActionsFromDiagnostics: codeActions.filesCodeActions = {};
79
79
// will be properly defined later depending on the mode (stdio/node-rpc)
80
80
let send : ( msg : p . Message ) => void = ( _ ) => { } ;
81
81
82
+ // Check if the rescript binary is available at node_modules/.bin/rescript,
83
+ // otherwise recursively check parent directories for it.
82
84
let findBinaryPathFromProjectRoot = (
83
85
directory : p . DocumentUri // This must be a directory and not a file!
84
86
) : null | p . DocumentUri => {
@@ -321,7 +323,10 @@ let openedFile = (fileUri: string, fileContent: string) => {
321
323
type : p . MessageType . Error ,
322
324
message :
323
325
extensionConfiguration . binaryPath == null
324
- ? "Can't find ReScript binary"
326
+ ? `Can't find ReScript binary in ${ path . join (
327
+ projectRootPath ,
328
+ c . nodeModulesBinDir
329
+ ) } or parent directories. Did you install it? It's required to use "rescript" > 9.1`
325
330
: `Can't find ReScript binary in the directory ${ extensionConfiguration . binaryPath } ` ,
326
331
} ,
327
332
} ;
You can’t perform that action at this time.
0 commit comments