Skip to content

Build Error On Windows #585

Closed
Closed
@JinweiOS

Description

@JinweiOS

When I built this project on win32 platform by commond npm run update-index, I found an error that said index_data directory can't find.

After debuging, I found these codes const __dirname = new URL('.', import.meta.url).pathname; in scripts of building that caused the error, for pathname is a uri that has a / at the beginning of the string.

This is right on unix-like system, but on windows the file strings look like \C:\Users\Administrator\project\rescript-lang.org\index_data\latest_belt_api_index.json is bad, it should start with C:.......

So I initiated this PR

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