X Tutup
The Wayback Machine - https://web.archive.org/web/20201020015148/https://github.com/SAFE-Stack/SAFE-BookStore/issues/301
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fable does not recognize port command during the build script #301

Open
psfinaki opened this issue Feb 25, 2018 · 4 comments
Open

Fable does not recognize port command during the build script #301

psfinaki opened this issue Feb 25, 2018 · 4 comments

Comments

@psfinaki
Copy link
Contributor

@psfinaki psfinaki commented Feb 25, 2018

(irrelevant: pffff, 3rd day in a row I am trying to do at least anything with the whole SAFE stack...)

When I run the build script, things go well until this line:
dotnet fable --port free webpack-dev-server
For this I get:
Unrecognized command: --port. Use dotnet fable --help to see available options.

App runs well at my 8080 if I remove --port free from this line in build.fsx:
let fablewatch = async { runDotnet clientPath "fable --port free webpack-dev-server" }

I am just starting with SAFE, have a little idea how things work here. ASAIU, fable actually does support port option. Also I see something has been done around this recently. Maybe fable here is not updated to a version when it started to support this option?

@forki
Copy link
Member

@forki forki commented Feb 25, 2018

psfinaki added a commit to psfinaki/CheckYourCzech that referenced this issue Mar 1, 2018
Should be done until this is resolved:
SAFE-Stack/SAFE-BookStore#301
@MangelMaxime
Copy link
Contributor

@MangelMaxime MangelMaxime commented Jul 13, 2018

I think the args order is wrong.

It should be webpack-dev-server --port free.

> dotnet fable --help
Fable F# to JS compiler (1.3.17)
Usage: dotnet fable [command] [script] [fable arguments] [-- [script arguments]]

Commands:
  -h|--help           Show help
  --version           Print version
  start               Start Fable daemon
  npm-run             Run Fable while an npm script is running
  yarn-run            Run Fable while a yarn script is running
  node-run            Run Fable while a node script is running
  shell-run           Run Fable while a shell script is running
  webpack             Start Fable daemon, invoke Webpack and shut it down
  webpack-dev-server  Run Fable while Webpack development server is running

Fable arguments:
  --timeout           Stop the daemon if timeout (ms) is reached
  --port              Port number (default 61225) or "free" to choose a free port
  --verbose           Print more info during execution

To pass arguments to the script, write them after `--`. Example:

    dotnet fable npm-run build --port free -- -p --config webpack.production.js

You can use shortcuts for npm and yarn scripts in the following way:

    dotnet fable yarn-start       # Same as `dotnet fable yarn-run start`
@forki
Copy link
Member

@forki forki commented Jul 13, 2018

@theimowski
Copy link
Member

@theimowski theimowski commented Jul 13, 2018

Currently template doesn't use --port free. It should probably though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.
X Tutup