[Windows Support] Can't create an Observable Framework project

I am trying to follow the Getting started instructions on creating an Observable Framework project from the start but I am eventually doing something wrong. Not very experienced with the command line …

I installed Node.js and in the terminal I started with npm init @observablehq but what I get is a series of prompts different to what are shown in the Framework user guide. In the end a package.json file is created within the project folder.

PS C:\Users\Admin> mkdir ojs-fm-test

    Directory: C:\Users\Admin

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----         2/16/2024   8:49 PM                ojs-fm-test

PS C:\Users\Admin> cd .\ojs-fm-test\
PS C:\Users\Admin\ojs-fm-test> npm init @observablehq
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.

See `npm help init` for definitive documentation on these fields
and exactly what they do.

Use `npm install <pkg>` afterwards to install a package and
save it as a dependency in the package.json file.

Press ^C at any time to quit.
package name: (ojs-fm-test)
version: (1.0.0)
entry point: (index.js)
test command:
git repository:
license: (ISC)
About to write to C:\Users\Admin\ojs-fm-test\package.json:

  "name": "ojs-fm-test",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  "author": "",
  "license": "ISC"

Is this OK? (yes)
PS C:\Users\Admin\ojs-fm-test>

What am I doing wrong?

The command npm init @observablehq is supposed to run our custom creation package, on npm as @observablehq/create. Instead it seems like you’re getting the default npm init behavior.

I suspect you might be using a version of npm from before they introduced this feature Can you share what version of Node and npm you are using? Framework requires at least Node 20.6.

Besides that, I notice you’re using Windows. Right now Framework doesn’t support Windows, but I’m actually working on that and hope to have good news in the next week. :crossed_fingers: In the meantime, we’ve had success with running Framework in WSL.

Yes, I am using Windows (Europe :smile: )
npm version is 10.2.4
node version is v20.11.1

Very curious! I don’t know why the setup command isn’t working for you. I think you might be able to use npx @observablehq/create instead. If that works you’ll at least be able to create the project and look around while we’re working on Windows support.

It doesn’t work. But, if I understand you correctly, the moment you add windows support, this should just work, right?

@mythmon - A suggestion … observable should work as a global package. Then OP could just run npm i -g observable and then observable create to get same result.

1 Like

I faced the same issue on a Windows machine. I am using Node v20.11.1

Framework does not currently support Windows. We added a caution note to the docs. You can try using WSL though. Please follow and upvote this issue for Windows support:

This works now :slight_smile: Thank you!!

1 Like