-
Notifications
You must be signed in to change notification settings - Fork 177
Description
I'm opening an issue because I think I've found a bug while debugging an issue with my own work on the discussion forum.
Here are my steps to reproduce:
I installed a fresh version of Framework 1.13 using npx @observablehq/framework@latest create.
I created a super simple JSX component in components/Button.jsx:
import * as React from "npm:react";
export default function Button() {
return (
<button>Test</button>
)
}I import and add this button to the existing index.md file:
import Button from './components/Button.js';
display(<Button />)The above display() call is in a fenced jsx block, sorry I don't know how to display that properly in here.
Anyways, then I run npm run dev and load the homepage, and the button does not appear.
I see this error in the browser console:
Uncaught (in promise) TypeError: createRoot is not a function at client.js:211:19
And sure enough in the client.js bundle it's importing the _npm/[email protected] library but that file does not export a method called createRoot..
Now, if I look in the .observablehq/cache/_npm folder I see that the [email protected] folder contains one file: _esm.js and that file is only 4,492 bytes.
The same file in a previous Framework v11.1 project, for [email protected] is around 192k ... Plus there are other files in that folder including a package.json etc.. Those other files are not present here in v1.13
Similarly the _esm.js file in the cache/_npm/[email protected] folder seems suspiciously small as well (11k)..
This is all from a fresh vanilla install with no other changes except creating a basic JSX component to test.
I'm on a Mac (Sequoia 15.1.1) and I'm running Node 20.11.1