Skip to content

running sbt as a subprocess causes confusionΒ #5

@scalway

Description

@scalway

I've installed sbt 1.6.1 in a system:

sbt --version
1.6.1

when I've tried to start vite dev server on
scalajs-sbt-vite-laminar-chartjs-example on branch laminar-end-state

$ npm run dev

> [email protected] dev
> vite

[info] welcome to sbt 1.8.2 (Ubuntu Java 11.0.18)
[info] loading settings for project global-plugins from common.sbt ...
[info] loading global plugins from /home/slovic/.sbt/1.0/plugins
[info] loading settings for project scalajs-sbt-vite-laminar-chartjs-example-build-build-build from metals.sbt ...

so it starts latest sbt version (as file build.properties defined) but sbt-runner version was still 1.6.1 so command failed as seen below:

...
[info] loading settings for project livechart from build.sbt ...
[info] set current project to livechart (in build file:./scalajs-sbt-vite-laminar-chartjs-example/)
[error] Expected symbol
[error] Not a valid command: --
[error] Expected 'debug'
[error] Expected 'info'
[error] Expected 'warn'
[error] Expected 'error'
[error] Expected 'addPluginSbtFile'
[error] --batch
[error]   ^
error when starting dev server:
Error: sbt invocation for Scala.js compilation failed with exit code 1.
    at ChildProcess.<anonymous> (file:./scalajs-sbt-vite-laminar-chartjs-example/node_modules/@scala-js/vite-plugin-scalajs/dist/index.js:24:24)
    at ChildProcess.emit (node:events:527:28)
    at maybeClose (node:internal/child_process:1090:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)

I was able to fix it by simply install current sbt version:

$ cs install sbt

I really don't know what to do with that, it is not critical (simple OS config fix) but could be blocker for many if cannot find help :(.

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