Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

BSC.exe: Wrong Argument. -bs-jsx expects an integer #277

Open
helegrod opened this issue May 24, 2019 · 4 comments
Open

BSC.exe: Wrong Argument. -bs-jsx expects an integer #277

helegrod opened this issue May 24, 2019 · 4 comments

Comments

@helegrod
Copy link

All .re files report an error at the first symbol of the file.

Occurred after creating a project with bsb-init app -theme react-hooks

Issue occurs across multiple machines, and over several version of bs-platform and reason-vscode.

Code still builds without issue.

C:\Users\Brothersr\Desktop\WorkBench\ReasonReact\app\node_modules\bs-platform\lib\bsc.exe: wrong argument '3''; option '-bs-jsx' expects an integer.
Usage: bsc <options> <files>
Options are:
  -bs-super-errors  Better error message combined with other tools 
  -bs-jsx  Set jsx version
  -bs-re-out  Print compiler output in Reason syntax
  -bs-gentype  Pass gentype command
  -bs-suffix  Set suffix to .bs.js
  -bs-no-implicit-include  Don't include current dir implicitly
  -bs-assume-has-mli  (internal) Assume mli always exist 
  -bs-assume-no-mli  (internal) Don't lookup whether mli exist or not
  -bs-D  Define conditional variable e.g, -D DEBUG=true

image

@tomcase
Copy link

tomcase commented Jun 7, 2019

This seems to be an issue on Windows, and I ran into the same problem. The way I solved it is by going into your .merlin auto-generated configuration file, and removing the quotes from around the FLG -ppx 'C:\Users\Brothersr\Desktop\WorkBench\ReasonReact\app\node_modules\bs-platform\lib\bsppx.exe -bs-jsx 3'

So mine looks like this:

FLG -ppx C:\Users\tom\dev\myproj\node_modules\bs-platform\lib\bsppx.exe -bs-jsx 3 

The issue comes down to using quotes to guard against spaces in windows path names. It lumps the second ' in with the integer at the end (3).

This is probably more of an issue with the bucklescript compiler than with this extension. See: rescript-lang/rescript#3588

I know this issue was opened two weeks ago, but I came across it while investigating the same issue, so I'll leave the answer in case anyone else does the same.

@bobzhang
Copy link

bobzhang commented Jun 8, 2019

hi @tac44 , this is prioritized and will be fixed soon

@Paosder
Copy link

Paosder commented Jun 24, 2019

This issue still occurs in windows 10 and it seems not resolved yet. Any progress?

@bobzhang
Copy link

@Paosder it is fixed in beta release

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@bobzhang @tomcase @Paosder @helegrod and others