React component for rendering documentation from your specification in real-time in the browser. It also provides a WebComponent and bundle for Angular and Vue
I am trying to use React component for rendering documentation. I cannot use it due to the problem with missing modules.
I created new application with create react app (I am aware that it is deprecated)
@asyncapi_react-component.js?v=ea97b21d:135394 Uncaught TypeError: Cannot read properties of undefined (reading 'alloc')
at newBuffer (@asyncapi_react-component.js?v=ea97b21d:135394:25)
at new BufferPool (@asyncapi_react-component.js?v=ea97b21d:135569:20)
at node_modules/avsc/lib/utils.js (@asyncapi_react-component.js?v=ea97b21d:135390:16)
at __require (chunk-G3QFXGXG.js?v=3b89d513:12:50)
at node_modules/avsc/lib/types.js (@asyncapi_react-component.js?v=ea97b21d:136094:17)
at __require (chunk-G3QFXGXG.js?v=3b89d513:12:50)
at node_modules/avsc/etc/browser/avsc-types.js (@asyncapi_react-component.js?v=ea97b21d:138785:18)
at __require (chunk-G3QFXGXG.js?v=3b89d513:12:50)
at node_modules/avsc/etc/browser/avsc-services.js (@asyncapi_react-component.js?v=ea97b21d:141343:21)
at __require (chunk-G3QFXGXG.js?v=3b89d513:12:50)
Steps to reproduce
Create application with npm create vite@latest asyncApiProject -- --template react-ts
Install asyncapi-react with npm install --save @asyncapi/react-component
Create new component AsyncApi.tsx:
import AsyncApiComponent from "@asyncapi/react-component"
import React from "react";
4. Add newely created component to your application. e.g. to main `App.tsx` component.
5. Run application with `npm run dev` and try to render react component with asyncapi.
**Troubleshooting**
- I tried to use version `v1.4.x` and `v2.0.0`
Description
I am trying to use React component for rendering documentation. I cannot use it due to the problem with missing modules. I created new application with create react app (I am aware that it is deprecated)
Then I installed asyncapi-react:
I tried to use
v20.13.1
orv18.20.3
package.json content:
Expected result
Application renders provided anyncapi definition.
Actual result
Steps to reproduce
npm create vite@latest asyncApiProject -- --template react-ts
npm install --save @asyncapi/react-component
AsyncApi.tsx
:export const AsyncApi = () => { return <>
}
const schema =
asyncapi: '2.0.0' info: title: Example version: '0.1.0' channels: example-channel: subscribe: message: payload: type: object properties: exampleField: type: string exampleNumber: type: number exampleDate: type: string format: date-time
;