Open andrewelamb opened 3 years ago
I've managed to fix the above installation issue, but when I call user_card("SMALL", 1), a window opens in the viewer, but nothing renders.
I think you need an SVG loader, perhaps https://www.pluralsight.com/guides/how-to-load-svg-with-react-and-webpack.
Thanks for the response @stla! I've fixed the installation issue, I'm wondering if you have any in insight on why this component doesn't render. Did I setup something wrong, or is it not compatible with the ReactR framework?
@andrewelamb I'm not a React master. But did you set the SVG loader?
Hi, we added the SVG loader and the issue is gone. Thank you.
But the Rstudio viewer window is still blank when I call user_card("SMALL", 1)
. There is a javascript error Uncaught ReferenceError: regeneratorRuntime is not defined
in RStudio dev tools.
I tried adding the @babel/plugin-transform-runtime
package in webpack.config.js based on some suggestions online but it doesn't help.
Any ideas on how to resolve this?
I already had a similar issue but I don't remember with which package. Perhaps you have to add presets
as below. Not sure.
module: {
rules: [
{
test: /\.jsx?$/,
loader: 'babel-loader',
options: {
presets: [
[
'@babel/preset-env',
{
targets: {
esmodules: true
}
}
],
'@babel/preset-react'
],
plugins: ["@babel/plugin-syntax-dynamic-import"]
}
}
]
},
Hi, I have updated the webpack configs with what you suggested but it doesn't help. I am still getting the same error.
My webpack file is located here: https://github.com/Sage-Bionetworks/shiny.synapse.react.client/blob/main/webpack.config.js
I'm trying to create a widget for this component, here.
Documentation.
This isn't working. I wonder if typescript will work, or I'm just doing something wrong. I'm getting this long error when attempting to install: