karthikbadam / Vistrates

7 stars 1 forks source link

CodeMirror is not defined #1

Open Rigo2000 opened 5 years ago

Rigo2000 commented 5 years ago

I'm working on CitSci Notebook at ScienceAtHome (Aarhus University) and am trying to implement Vistrates in the projects. However I get the message that javascript-viscontroller is "invalid" and it seems to start with CodeMirror being undefined in code.

Any ideas how I can fix this?

I exported the Vistrates packages from the demos and imported them into my Codestrate. is CodeMirror... something unique to Vistrate? Since the function doesn't exist in any other codestrate.

Uncaught (in promise) ReferenceError: CodeMirror is not defined at eval (VisComponent_VM_mYGb6Cn5:12) at HTMLDivElement.eval (VisComponent_VM_mYGb6Cn5:144) at codestrate.VirtualMachines.create (JavaScript_VM:42) at Object.execute (Virtual_Machine__VM_:59) at Object.codestrate.runCode (Execute_Code_Paragraphs:47) at execute (Execute_Code_Paragraphs:110) at continueWithNext (Execute_Code_Paragraphs:129) at Object.continue (Execute_Code_Paragraphs:145) at Object.codestrate.runCode (Execute_Code_Paragraphs:68) at execute (Execute_Code_Paragraphs:110)

karthikbadam commented 5 years ago

Hi,

CodeMirror is not unique to Vistrates, but are you on the Aarhus server? I know the Aarhus server has an updated Codestrates version. Can you share the codestrate with me (via URL)?

On Fri, Feb 8, 2019 at 6:33 AM Rigo2000 notifications@github.com wrote:

I'm working on CitSci Notebook at ScienceAtHome (Aarhus University) and am trying to implement Vistrates in the projects. However I get the message that javascript-viscontroller is "invalid" and it seems to start with CodeMirror being undefined in code.

Any ideas how I can fix this?

I exported the Vistrates packages from the demos and imported them into my Codestrate. is CodeMirror... something unique to Vistrate? Since the function doesn't exist in any other codestrate.

Uncaught (in promise) ReferenceError: CodeMirror is not defined at eval (VisComponent_VM_mYGb6Cn5:12) at HTMLDivElement.eval (VisComponent_VM_mYGb6Cn5:144) at codestrate.VirtualMachines.create (JavaScript_VM:42) at Object.execute (Virtual_Machine_VM:59) at Object.codestrate.runCode (Execute_Code_Paragraphs:47) at execute (Execute_Code_Paragraphs:110) at continueWithNext (Execute_Code_Paragraphs:129) at Object.continue (Execute_Code_Paragraphs:145) at Object.codestrate.runCode (Execute_Code_Paragraphs:68) at execute (Execute_Code_Paragraphs:110)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/karthikbadam/Vistrates/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/AEAGJgXZDhi5voTPh0SnWiYZDim-8OoRks5vLWBsgaJpZM4avI91 .

-- Sriram Karthik Badam PhD Candidate, Computer Science Student Member, HCIL University of Maryland College Park, MD, USA Website: karthikbadam.github.io

Rigo2000 commented 5 years ago

That's what I figured. Yes, I'm on the Aarhus Server. I copied the CodeMirror module from a Vistrate into my Codestrate and it works I think.

Codestrate with Aarhus CodeMirror version https://webstrates.cs.au.dk/sweet-robin-44/

Codestrate with copied CodeMirror https://webstrates.cs.au.dk/little-robin-40/

EDIT: Copying CodeMirror from Vistrates doesn't work :P