esm.sh
esm.sh copied to clipboard
Failed to import - https://esm.sh/[email protected]/client?dev
Failing module
- GitHub: https://github.com/facebook/react/tree/main/packages/react-dom
- npm: https://www.npmjs.com/package/react-dom
With test.mjs
:
// @ts-check
import { hydrateRoot } from "https://esm.sh/[email protected]/client?dev";
Error message
After running deno check test.mjs
I got this:
Download https://esm.sh/[email protected]/client?dev
Download https://esm.sh/v90/[email protected]/deno/client.development.js
Download https://esm.sh/v90/@types/react-dom@~18.2/client~.d.ts
Download https://esm.sh/v90/[email protected]/deno/react-dom.development.js
Download https://esm.sh/v90/[email protected]/deno/react.development.js
Download https://esm.sh/v90/[email protected]/deno/scheduler.development.js
Check file://[redacted]/test.mjs
error: TS2305 [ERROR]: Module '"deno:///missing_dependency.d.ts"' has no exported member 'hydrateRoot'.
import { hydrateRoot } from "https://esm.sh/[email protected]/client?dev";
~~~~~~~~~~~
at file://[redacted]/test.mjs:3:10
After running deno info test.mjs
I got this:
Download https://esm.sh/[email protected]/client?dev
Download https://esm.sh/v90/[email protected]/deno/client.development.js
Download https://esm.sh/v90/@types/react-dom@~18.2/client~.d.ts
Download https://esm.sh/v90/[email protected]/deno/react-dom.development.js
Download https://esm.sh/v90/[email protected]/deno/react.development.js
Download https://esm.sh/v90/[email protected]/deno/scheduler.development.js
local: /Users/jaydenseric/Demos/deno-esmsh-react/test.mjs
type: Mjs
dependencies: 5 unique (total 966.21KB)
file://[redacted]/test.mjs (88B)
└─┬ https://esm.sh/[email protected]/client?dev (209B)
├── https://esm.sh/v90/@types/react-dom@~18.2/client~.d.ts (missing)
├─┬ https://esm.sh/v90/[email protected]/deno/client.development.js (2.74KB)
│ └─┬ https://esm.sh/v90/[email protected]/deno/react-dom.development.js (869.51KB)
│ ├── https://esm.sh/v90/[email protected]/deno/react.development.js (74.02KB)
│ └── https://esm.sh/v90/[email protected]/deno/scheduler.development.js (19.66KB)
Note that https://esm.sh/v90/@types/react-dom@~18.2/client~.d.ts
is a 404.
Additional info
- esm.sh version: It should be v91, but for some reason even with cleared Deno cache v90 loads.
- Deno version: 1.24.3
I've been trying unsuccessfully to get React v18 from esm.sh to work for 3 months now; see https://github.com/ije/esm.sh/issues/331 . I'm starting to get desperate as this is the last thing holding up a new React v18 compatible version of Ruck.
It seems to be requesting the wrong version of @types, v18.0.6 seems to work.
https://esm.sh/v90/@types/[email protected]/client~.d.ts
Latest npm version: https://www.npmjs.com/package/@types/react-dom/v/18.0.6
v91 fixed this wrong types, please try with --reload
flag
@ije I deleted the Deno dir and all the cache within each time for the output presented in the issue description, but here is the result of running deno check --reload test.mjs
:
Download https://esm.sh/[email protected]/client?dev
Download https://esm.sh/v90/[email protected]/deno/client.development.js
Download https://esm.sh/v90/@types/react-dom@~18.2/client~.d.ts
Download https://esm.sh/v90/[email protected]/deno/react-dom.development.js
Download https://esm.sh/v90/[email protected]/deno/react.development.js
Download https://esm.sh/v90/[email protected]/deno/scheduler.development.js
Check file://[redacted]/test.mjs
error: TS2305 [ERROR]: Module '"deno:///missing_dependency.d.ts"' has no exported member 'hydrateRoot'.
import { hydrateRoot } from "https://esm.sh/[email protected]/client?dev";
~~~~~~~~~~~
at file://[redacted]/test.mjs:3:10
The issue is reproducible with empty cache.
@jaydenseric seem you still got v90
i believe this has been fixed