Hi Team,
react-viro init ViroSample --verbose is not working and it stops like this in my Mac OS High Sierra.
Node version is v8.2.1
NPM version is v4.6.1
..............
..............
..............
Installing react-viro v2.4.0...
Error: Could not find or load main class add
Thanks
Can you try upgrading to node version 8.4 or higher and see if that resolved this issue?
Hi @mkharibalaji, also do you have yarn installed by any chance?
This stack overflow issue below could be what you are running into:
https://stackoverflow.com/questions/44930518/yarn-js-commands-failing-with-error-could-not-find-or-load-main-class-run
Thanks a lot guys.Will check out and get back to you.
In the meanwhile I was able to successfully set up a separate react native project and then included viro react and i added the setting as described https://docs.viromedia.com/docs/integrate-project-with-viro
node dependencies :
"dependencies": {
"react": "16.3.0-alpha.2",
"react-native": "0.54.2",
"react-viro": "^2.4.0"
},
From the code given in the ARsample in App.js
var objArray = [
require('./js/res/coffee_mug/object_coffee_mug.vrx'),
require('./js/res/object_flowers/object_flowers.vrx'),
require('./js/res/emoji_smile/emoji_smile.vrx')];
I am seeing an error like,
error: bundling failed: Error: Unable to resolve module ./js/res/coffee_mug/object_coffee_mug.vrx from /Users/haribalajimk/reactnativeprojects/oinosAR/App.js: The module ./js/res/coffee_mug/object_coffee_mug.vrx could not be found from /Users/haribalajimk/reactnativeprojects/oinosAR/App.js. Indeed, none of these files exist:
/Users/haribalajimk/reactnativeprojects/oinosAR/js/res/coffee_mug/object_coffee_mug.vrx(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json)Is this error because of different react native version ?
Do you want me take this issue as a separate one then i could raise it as a separate one.
Hi @VikAdvani ,
It worked once Hadoop's yarn is uninstalled.Thanks a lot.
It's still and issue, I have the same problem using AR sample.
15:56:45 [exp] Unable to resolve "./res/emoji_smile/emoji_smile.vrx" from "viromedia/ARSample/helloWorldScene.js"
Hi @dody87 how did you init the AR Sample? Are you using expo or did you use react-viro init? Can you verify:
1) The file is in the proper path ./res/emoji_smiile/emoji_smile.vrx.
2) Your rn-cli.config.js in the project root has the following below getAssetRoots():
getAssetExts() {
return ["obj", "mtl", "JPG", "vrx", "hdr"];
},
Most helpful comment
Hi @VikAdvani ,
It worked once Hadoop's yarn is uninstalled.Thanks a lot.