jaspr icon indicating copy to clipboard operation
jaspr copied to clipboard

jaspr build stops with "Instance of 'OptionsSkew'" when jaspr serve is running

Open ChrisMarxDev opened this issue 7 months ago • 1 comments

Description I had trouble building my site with jaspr build This is was my output:

❯ jaspr build --verbose
[CLI] Building jaspr for static rendering mode.
[CLI] Building web assets...
[BUILDER] Generating build script...
[BUILDER] Generating build script completed, took 167ms
[BUILDER] Running Options: {--define, jaspr_web_compilers:ddc=generate-full-dill=true, --delete-conflicting-outputs, --define=jaspr_web_compilers:ddc=environment={"jaspr.flags.verbose":false}, --build-mode=BuildMode.Auto}
[BUILDER] Requested Options: {--release, --verbose, --delete-conflicting-outputs, --define=jaspr_web_compilers:entrypoint=dart2js_args=["-Djaspr.flags.release=true","-O2"], --build-mode=BuildMode.Auto}
Instance of 'OptionsSkew'

After some fiddling, I think I found out, that the issue was that jaspr serve was still running. I am not sure if this is a bug per se, or if we just need a better error message, but I think it's worth reporting as people playing around with jaspr might be stumped by this, as I was. Steps To Reproduce

  1. Activate jaspr through dart pub global activate jaspr_cli
  2. Create a new project with jaspr create test
  3. cd test
  4. jaspr serve
  5. Open new terminal window in the same directory
  6. jaspr build

Expected Behavior Either the site builds correctly or we throw an error message, that informs the user better.

Aditional Info

❯ jaspr doctor
[✓] Jaspr CLI (Version 0.13.3)
  • Dart Version 3.4.3 (stable) (Tue Jun 4 19:51:39 2024 +0000) on "macos_arm64" at /Users/christophermarx/fvm/versions/stable/bin/cache/dart-sdk/bin/dat
  • Running on macos Version 14.3 (Build 23D56) - Locale en-DE
  • Analytics: Enabled

[✓] Current Project
  • Dependencies on core packages:
    • jaspr: ^0.13.3
    • jaspr_builder: ^0.13.3 (dev)
    • jaspr_web_compilers: ^4.0.9 (dev)
    • jaspr_router: ^0.4.2
  • Rendering mode: static
  • Uses jaspr compilers: true
  • Uses flutter embedding: false

ChrisMarxDev avatar Jul 19 '24 15:07 ChrisMarxDev