-
Notifications
You must be signed in to change notification settings - Fork 221
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
Error when adding react element #2484
Comments
Can someone please help on this ? |
anyone? How to deal with this? |
@dmuley17 what version of elements are you using? We believe we fixed an issue similar to this and it was released in version 7.13.9 of elements. If you are using this version or later and still experiencing this issue, please give us the following information:
|
Hello, we are just following the documents and trying to create new react project. its failing with that too. https://docs.stoplight.io/docs/elements/11b969f962273-elements-dev-portal-in-react ![]() |
This ticket has been labeled jira. A tracking ticket in Stoplight's Jira ( |
@dmuley17 for docuasaurus, i found this plugin https://www.npmjs.com/package/docusaurus-node-polyfills that seems to remedy the problem. we'll update our docs and keep working on create-react-app. |
unfortunatly that is not helping, i am still having the same issue. Let us know if any specific steps to follow.
and access the page and it still shows the error of
|
Hello is this confirmed that issue is still exist @daniel-white |
@dmuley17 @dnyaneshwar-m similarly to CRA case you may try using node-polyfill-webpack-plugin. It should handle all missing polyfills that were supported within webpack earlier. To do that in docusaurus you'll need to add a custom plugin:
// ./plugins/webpackPolyfillPlugin.js
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');
module.exports = function (context, options) {
return {
name: 'webpack-polyfill-plugin',
configureWebpack(config, isServer, utils) {
return {
plugins: [new NodePolyfillPlugin()],
};
},
};
};
// docusaurus.config.js
module.exports = {
...
plugins: [
...
require.resolve('./plugins/webpackPolyfillPlugin'),
],
}; When running it with |
I am trying to use the elements in my docusasuras documentation but facing below issues.
Tried adding
process
defined it in index.js but still no luck.The text was updated successfully, but these errors were encountered: