Open tshemeng opened 8 months ago
Hi! Looks like you have something in hello.js
that JavaScript doesn't like. Can you share the script?
This script should work:
const vscode = require("vscode");
showHelloMessage = async () => {
const button = await vscode.window.showInformationMessage("Hello World!", "Cancel", "OK");
if (button === "OK") {
vscode.window.showInformationMessage("You clicked OK! Try clicking Cancel too?.");
} else {
const name = await vscode.window.showInputBox({
title: "CIA wants to know",
prompt: "What is your name?",
});
vscode.window.showInformationMessage(`Hello ${name}!`);
}
};
showHelloMessage();
@PEZ i test on three computers got same error, here is screen recording test your code: https://github.com/BetterThanTomorrow/joyride/assets/8343797/3cba8142-dbf8-4458-a411-34e857474658
@tshemeng, thanks for testing that. I don't know what's going on, but could be specific to Windows. I'll get hold of a Windows machine to test this on.
Can you confirm that ClojureScript (.cljs
) scripts work? You can try with this one for a direct compare:
(require '["vscode" :as vscode]
'[promesa.core :as p])
(defn show-hello-message []
(p/let [button (vscode/window.showInformationMessage "Hello World!" "Cancel" "OK")]
(if (= "OK" button)
(vscode/window.showInformationMessage "You clicked OK! Try clicking Cancel too?.")
(p/let [name (vscode/window.showInputBox #js {:title "CIA wants to know",
:prompt "What is your name?"})]
(vscode/window.showInformationMessage (str "Hello " name))))))
(show-hello-message)
@PEZ .cljs works fine.
Open any project on Windows, run command
Joyride: Run Workspace Script...
, select a .js file, VSCode Joyride got error