dragos / dragos-vscode-scala

Other
253 stars 39 forks source link

Error: ENOENT: no such file or directory, open '/Users/username/dev/mynicelittleproject/project/target/active.json' #75

Closed Empty2k12 closed 6 years ago

Empty2k12 commented 6 years ago

Upon installation the ensime the plugin crashes 5 times and is then not executed by Visual Studio Code anymore.

Error: ENOENT: no such file or directory, open '/Users/username/dev/mynicelittleproject/project/target/active.json'
    at Object.fs.openSync (fs.js:584:18)
    at Object.module.(anonymous function) [as openSync] (ELECTRON_ASAR.js:173:20)
    at Object.fs.readFileSync (fs.js:491:33)
    at Object.fs.readFileSync (ELECTRON_ASAR.js:505:29)
    at discoverUrl (/Users/username/.vscode/extensions/lightbend.vscode-sbt-scala-0.0.2/server/server.js:24:34)
    at Object.<anonymous> (/Users/username/.vscode/extensions/lightbend.vscode-sbt-scala-0.0.2/server/server.js:6:9)
    at Object.<anonymous> (/Users/username/.vscode/extensions/lightbend.vscode-sbt-scala-0.0.2/server/server.js:28:3)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
[Error - 22:57:37] Connection to server got closed. Server will not be restarted.
laughedelic commented 6 years ago

This is caused by a different extension: vscode-sbt-scala (it's mentioned in your log). The reason of the failure is that it tried to detect a running sbt server (which keeps that active.json file).

Most likely you are not using the right version of sbt. sbt server functionality has not been released publicly yet and this extension is experimental. If you still want to try it, run a beta version of sbt with

sbt -sbt-version 1.1.0-M1 -no-colors

and then open the project in VS Code.

Empty2k12 commented 6 years ago

@laughedelic I am sorry about this!

laughedelic commented 6 years ago

No problem with me 😄