Multi Scene webAR demo has error

I’m following the Multi Scene webAr demo and everything is working but I keep getting an error saying it can’t find my TreeSceneComponents, but I have followed the tutorial step by step, I have my tree-components.js in my components folder, and at the bottom of the tap to place I have below.

In the tutorial video it’s at 24 minutes where it’s shown how to impliment, I follow to t but not working for me, get error saying can’t find TreeSceneComponents…

const TreeSceneComponents = [
{name: ā€˜tap-place’, val: tapPlaceComponent},
]

export {TreeSceneComponents}

in my trees.tsx file I have this

const TreeScene = withRouter(({match}) => (
<React.Fragment>

<AFrameScene
sceneHtml={require(ā€˜./trees.html’)}
components={TreeSceneComponents}
/>
</React.Fragment>
))

export {TreeScene}

not sure what I’ve got wrong here, so close but so frustrating…

I think I found the issue, I was missing the declaration at the top of my tree.tsx file. Components now loading!! But now getting a 404 error when trying to access the button…

Hey Bill! Glad to hear you’ve made some progress. Did you add a new route for the trees scene in react-app.jsx? This is done at ~25 minutes into the tutorial.

Believe it or not the issue was the single quote, as I traced line by line I could see there was difference in the tutorial and my work was a single quote not being the correct type… I totaly forgot there was a differnt kind of single quote, I know there is a big difference how some languages treat single and double quote but never sideways single… learn something new every day. You can see here the single quotes are not ’ they are soon as I switched them it worked. <Route exact path={${base}/trees`} component={TreeScene}/>

1 Like

Glad to hear you figured it out! Thanks for sharing your solution!

Not a problem, sometimes its the simplest things that trip you up. One question for you Evan, is there a way to remove a question, say if I post something and then five minutes later solve it myself, I would like to remove the question as not to waste anyone’s time.

Yep! You can click the three dots on the lower right side of the post, then click the trash icon :slight_smile:

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.