diff --git a/packages/server-renderer/README.md b/packages/server-renderer/README.md index 90626283f5d..826e2514f4f 100644 --- a/packages/server-renderer/README.md +++ b/packages/server-renderer/README.md @@ -88,7 +88,7 @@ function renderToWebStream( **Usage** ```js -// e.g. inside a Cloudflare Worker +// e.g. inside an environment with ReadableStream support return new Response(renderToWebStream(app)) ``` diff --git a/packages/server-renderer/src/renderToStream.ts b/packages/server-renderer/src/renderToStream.ts index 516bff8ee8d..ca69ce99a9e 100644 --- a/packages/server-renderer/src/renderToStream.ts +++ b/packages/server-renderer/src/renderToStream.ts @@ -129,7 +129,7 @@ export function renderToWebStream( ): ReadableStream { if (!Ctor && !hasGlobalWebStream) { throw new Error( - `ReadableStream constructor is not avaialbe in the global scope and ` + + `ReadableStream constructor is not available in the global scope and ` + `must be explicitly passed in as the 3rd argument:\n\n` + ` import { ReadableStream } from 'stream/web'\n` + ` const stream = renderToWebStream(app, {}, ReadableStream)`