Open inar-vision opened 1 year ago
Remove ../public
from your URLs, that should fix it.
Not entirely, I'm getting a couple new error on Build.framework.js
You've removed too much, Keep the leading /
😁
That's not it. :( Trust me, I've tried pretty much every combination on those paths..
Have the same error. create-react-app with react-unity-webgl
In appearance, there are some problems when working specifically with CRA, because the installation in react project, which was created by "hands" (https:/dev.to/stepstep.to/ivadyhabimana/how--create-a-withwithout-appervice-creang----reactrea-appBusi-a30nl) - everything works
The link seem don't work any more.
In appearance, there are some problems when working specifically with CRA, because the installation in react project, which was created by "hands" (https:/dev.to/stepstep.to/ivadyhabimana/how--create-a-withwithout-appervice-creang----reactrea-appBusi-a30nl) - everything works
i have the same error with CRA and react-unity-webgl.
@levkovich2806 can you reupload the link with created by ¨hands¨ solution plz?
Create react app without CRA - https://dev.to/ivadyhabimana/how-to-create-a-react-app-without-using-create-react-app-a-step-by-step-guide-30nl
Thanks @levkovich2806!
I have tried to use the library with Vite instead of CRA and it works perfectly.
you can fix with CRA
add webpack.config.js in project root
example webpack.config.js
const HtmlWebpackPlugin = require('html-webpack-plugin');
const path = require('path');
module.exports = {
entry: './index.js',
mode: 'development',
output: {
path: path.resolve(__dirname, './dist'),
filename: 'index_bundle.js',
publicPath: '/'
},
target: 'web',
devServer: {
port: '5000',
static: {
directory: path.join(__dirname, 'public')
},
open: true,
hot: true,
liveReload: true,
},
resolve: {
extensions: ['.js', '.jsx', '.json'],
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: 'babel-loader',
},
],
},
plugins: [
new HtmlWebpackPlugin({
template: path.join(__dirname, 'public', 'index.html')
})
]
};
I have the same exact problem, with the URLs correct and everything, however my project wasn't created from create-react-app, but rather I pulled a react template and started modifying it. What should I do in this case? The template is CoreUI incase you're wondering.
Edit: I realized there's a "WebGL" extra text in the dataurl, however even after fixing that. The problem remains the same.
facing same problem. have you figured out the solution ? @YukimuraKyoko
Please avoid duplicates
Language and Compiler
Babel and WebPack JavaScript
What environment are you using?
Local Development Server
When does your problem occur?
When the Context is created
What does your problem relate to?
The problem seems React related
React-Unity-WebGL Version
9.4.0
React Version
18.2.0
Unity Version
2021.3.4f1
What happened?
I get an Error about unexpected token..? Seems to be that a lot of people have got this, but I can't seem to figure this out.
Reproducible test case
No response
Would you be interested in contributing a fix?