GordonSmith / vscode-ojs

VS Code extension for ObservableHQ notebooks
https://marketplace.visualstudio.com/items?itemName=GordonSmith.observable-js
MIT License
59 stars 5 forks source link

Install experience #65

Open markNZed opened 2 months ago

markNZed commented 2 months ago

Hi, I'm new to JS notebooks and would like to try your extension. Thanks for making this available. I installed the extension gordonsmith.observable-js and downloaded the recommended notebook https://observablehq.com/@observablehq/five-minute-introduction which states Update, March 2022: [A Taste of Observable](https://observablehq.com/@observablehq/a-taste-of-observable?collection=@observablehq/overview) is the most recently updated and best introduction to the Observable platform. This notebook will remain for history, but please check out A Taste of Observable! when I tried that file I see an error: RuntimeError: try_it is not defined but I can run the five-minute-introduction

I would like to use ESM style JS and is this possible ? When I did try it did not appear to work and I see "Cannot read properties of undefined (reading 'nodes')"

GordonSmith commented 1 month ago

There are two types of JavaScript cells, a plain JS cell which won't execute and an "Observable JS" which uses the Observable JS Syntax, which is the same one used on https://observablehq.com/.

For more information see https://observablehq.com/documentation/cells/observable-javascript which highlights why its different.