Skip to content

Formatting not working on Windows #5

Closed
@illbexyz

Description

@illbexyz

When formatting on Windows I get this error:

[Error - 20:56:35] Request textDocument/formatting failed.
  Message: Cannot find a nearby node_modules\bs-platform\win32\bsc.exe. It's needed for formatting.
  Code: -32600 

I found the cause of the error in:

// TODO: remove this hack
let filePath = openFile.replace('file://', '');

because just removing the file:// prefix isn't enough in Windows. On my system filePath contains \c%3A\Users\Alberto\workspace\rescript-vscode\node_modules\bs-platform\win32\bsc.exe which isn't recognized by NodeJS's APIs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions