Skip to content
This repository was archived by the owner on Sep 15, 2026. It is now read-only.
This repository was archived by the owner on Sep 15, 2026. It is now read-only.

Toplevel expression is expected to have unit type #21

Description

@logandeancall

I installed this via https://github.com/draftbit/bs-storybook to workaround #13. I am only attempting to write the basic story example when running into this error.

  3 │ let _module = %bs.raw("module")
  4 │ 
  5 │ storiesOf("My First Reason Story", _module)->add("Chapter I", () =>
  6 │   <span> {React.string("Hello bs-storybook!")} </span>
  7 │ )
  
  Toplevel expression is expected to have unit type.
  
FAILED: cannot make progress due to previous errors.
>>>> Finish compiling(exit: 1)

The word add on line 5 is what's highlighted in the error by the ReScript compiler

Using "bs-platform": "^8.4.2",

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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