-
-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot use React component for rendering documentation due to missing modules like fs, util from @asyncapi/parser/esm, @stoplight/json-ref-readers #956
Comments
Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request. |
Please try with latest |
Regrettably, I've encountered the same outcome even after testing the latest version of the component with both Node 18 and 20. |
@derberg could you help me with this? |
experiencing it as well (tried to lower version to 1.3.8, still encountering the issue) |
🤔 https://github.com/asyncapi/asyncapi-react/blob/master/library/webpack.config.js#L50 |
I'm stuck dealing with a recurring problem and can't seem to find a fix for it. |
I have the same issue and tried to fix it by downgrading versions (which did not help). We wanted to adopt AsyncAPI widely for our users, but not having UI for it is a no-go. |
Webpack since version 5 no longer automatically adds polyfills for all native modules from nodejs, you have to add them yourself. If you are using There is also an option to use component without |
I forgot about one thing, import AsyncAPIStandalone from '@asyncapi/react-component/browser/standalone'
AsyncAPIStandalone.render(...) docs: https://github.com/asyncapi/asyncapi-react/blob/master/docs/usage/standalone-bundle.md but I don't remember if it still works. |
I tried without-parser by slightly modifying the example codesandbox in your readme but something might be broken, nothing happens. I think this might be why there are so many downloads on NPM for 0.24.23 |
@derberg after two months this issue is still present. I have tried the newest version with the node in version 18 and 20. |
we need more support here in this project and prefer PRs with fixes. @magicmatatjahu wouldn't be the best from developer experience if we make sure |
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 am using node
v20.11.1
.package.json content:
Expected result
Application renders provided anyncapi definition.
Actual result
Steps to reproduce
npx create-react-app async-api-check --template typescript
npm install --save @asyncapi/react-component
AsyncApi.tsx
:App.tsx
component.npm start
and try to render react component with asyncapi.Troubleshooting
v1.3.8
The text was updated successfully, but these errors were encountered: