avli / clojureVSCode

Clojure support for Visual Studio Code
https://avli.github.io/clojureVSCode/
MIT License
205 stars 34 forks source link

command 'clojureVSCode.manuallyConnectToNRepl' not found #68

Open sc-lewis-notestine opened 6 years ago

sc-lewis-notestine commented 6 years ago

PROBLEM: cannot connect to running REPL.

REPRO:

  1. Install extension and reload per normal.
  2. Set the "clojureVSCode.autoStartNRepl" setting to false
  3. Try to attach to a running repl by Cmd+Shift+P : Clojure: connect to a running nREPL

EXPECTED: Successful connect to running REPL

OBSERVED: "command 'clojureVSCode.manuallyConnectToNRepl' not found"

ENVT: Mac OSX 10.12 VSCODE 1.16.1

NOTE: Also found that the nREPL was also taking an indefinite amt of time when automatically starting-

sc-lewis-notestine commented 6 years ago

NOTE: was able to get workaround by going into the extensions directory for VSCode and manually building with NPM install per https://github.com/Microsoft/vscode/issues/18537

However did not expect to have to do this - installed via the Extension Mktplace from within Vs Code.

avli commented 6 years ago

That's weird. Could you try to delete the extension completely, remove all its directories from the VSCode extension directory and try to install it from Marketplace again and share the results?

mradke commented 6 years ago

UPDATE: I don't know why but somehow it does not throw the error message anymore.


Same problem, same environment. The suggested workaround of sc-lewis did not work for me either.

Steps taken:

Maybe relevant info: node v8.5.0 / npm v5.3.0

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/8.5.0/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'run-script',
1 verbose cli   'vscode:prepublish' ]
2 info using npm@5.3.0
3 info using node@v8.5.0
4 verbose run-script [ 'prevscode:prepublish',
4 verbose run-script   'vscode:prepublish',
4 verbose run-script   'postvscode:prepublish' ]
5 info lifecycle clojure@0.9.0~prevscode:prepublish: clojure@0.9.0
6 info lifecycle clojure@0.9.0~vscode:prepublish: clojure@0.9.0
7 verbose lifecycle clojure@0.9.0~vscode:prepublish: unsafe-perm in lifecycle true
8 verbose lifecycle clojure@0.9.0~vscode:prepublish: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/$USER/.vscode/extensions/avli.clojure-0.9.0/node_modules/.bin:/Users/$USER/.local/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
9 verbose lifecycle clojure@0.9.0~vscode:prepublish: CWD: /Users/$USER/.vscode/extensions/avli.clojure-0.9.0
10 silly lifecycle clojure@0.9.0~vscode:prepublish: Args: [ '-c', 'tsc -p ./' ]
11 silly lifecycle clojure@0.9.0~vscode:prepublish: Returned: code: 1  signal: null
12 info lifecycle clojure@0.9.0~vscode:prepublish: Failed to exec vscode:prepublish script
13 verbose stack Error: clojure@0.9.0 vscode:prepublish: `tsc -p ./`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:289:16)
13 verbose stack     at emitTwo (events.js:125:13)
13 verbose stack     at EventEmitter.emit (events.js:213:7)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
13 verbose stack     at emitTwo (events.js:125:13)
13 verbose stack     at ChildProcess.emit (events.js:213:7)
13 verbose stack     at maybeClose (internal/child_process.js:927:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
14 verbose pkgid clojure@0.9.0
15 verbose cwd /Users/$USER/.vscode/extensions/avli.clojure-0.9.0
16 verbose Darwin 16.6.0
17 verbose argv "/usr/local/Cellar/node/8.5.0/bin/node" "/usr/local/bin/npm" "run-script" "vscode:prepublish"
18 verbose node v8.5.0
19 verbose npm  v5.3.0
20 error code ELIFECYCLE
21 error errno 1
22 error clojure@0.9.0 vscode:prepublish: `tsc -p ./`
22 error Exit status 1
23 error Failed at the clojure@0.9.0 vscode:prepublish script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
jc776 commented 6 years ago

The extension only 'activates' after you open a Clojure file, "onLanguage:clojure", but the Command Palette entries are are visible immediately.

With 0.9.0 from the Marketplace, I had this error when trying the commands immediately after opening the folder. After opening any .clj, .cljs, .cljc file, the commands do exist. build.boot counts as Plain Text unless registered by another extension or manually in User Settings.

The copy from the Marketplace does not have the src directory, so you can't re-compile it with prepublish. The node_modules and out/src directories look OK, though.

    "files.associations": {
        "*.boot": "clojure"
    }
avli commented 6 years ago

@sc-lewis-notestine does the solution from the previous post work for you?

cswl commented 6 years ago

I too had the same error.. I set clojureVSCode.autoStartNRepl to false and reinstalled then I was able to connect manually..

However start nREPL from VSCode doesnt work.. this error is thrown


/home/shared/VSCode-linux-x64/resources/app/out/vs/workbench/workbench.main.js:10 spawn lein ENOENT: Error: spawn lein ENOENT
    at exports._errnoException (util.js:1050:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
    at onErrorNT (internal/child_process.js:367:16)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)
e.onUnexpectedError @ /home/shared/VSCode-linux-x64/resources/app/out/vs/workbench/workbench.main.js:10
/home/shared/VSCode-linux-x64/resources/app/out/vs/workbench/workbench.main.js:9 nREPL already started.
e.doShow @ /home/shared/VSCode-linux-x64/resources/app/out/vs/workbench/workbench.main.js:9

Kind of strange since I do have lein installed..

antons1 commented 6 years ago

I had this exact error, appearing after i set clojureVSCode.autoStartNRepl to false. It worked after opening a .clj file.