Skip to content

Whitespace in name bsconfig.json causes error: Can not handle multiple files #5087

Closed
@ghost

Description

Hello there,

I encountered a (not very helpful) error when trying to compile a project with a bsconfig.json that has a name with a whitespace i.e. "name": "My rescript project". As requested on the forum https://forum.rescript-lang.org/t/error-can-not-handle-multiple-files/1368 I am posting the issue here.

Thank you for your time and efforts 😄

OS

Windows (using bash)

Problem

When trying to compile a project with a bsconfig.json that has a whitespace in the name, I am getting the following error:

$ bsb -make-world -clean-world -w
Cleaning... 54 files.
Cleaning... 5 files.
Dependency on @rescript/react
bsb: [38/38] src/legacy/ReactDOMRe.cmj
bsb: [49/49] install.stamp
Dependency Finished
>>>> Start compiling
bsb: [3/3] pages/index.cmj
FAILED: pages/index.cmj
can not handle multiple files
FAILED: cannot make progress due to previous errors.
>>>> Finish compiling(exit: 1)

How to reproduce

Change name in bsconfig.jsonfrom:

{
  "name": "Rescript next.js-app"
}

Run:

bsb -make-world -clean-world -w

Behold the error

Change the name to something without whitespaces bsconfig.json:

{
  "name": "rescript-nextjs-app"
}

And the error disappears.

Reference

https://forum.rescript-lang.org/t/error-can-not-handle-multiple-files/1368/8?u=doctorgoat

Thank you for filing! Check list:

  • Is it a bug? Usage questions should often be asked in the forum instead.
  • Concise, focused, friendly issue title & description.
  • A minimal, reproducible example.
    • Ideally in OCaml syntax for now. To isolate the problem caused by either Reason or the New Syntax.
  • OS and browser versions, if relevant.
  • Is it already fixed in master?

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