#Issue with React Router 6

9 messages · Page 1 of 1 (latest)

vale portal
#

Hi guys,
Trying to use React router 6 to render a website and have a bunch of links and pages in it. I'm trying to get the browser to render the app but when using RR6, it's not displaying anything. The app itself works fine when I dont use react router but when I try to implement RR into my project, poof. White page. Any ideas?

west root
#

Have you pushed this to git? Can you share the repo?

vale portal
#

Think that link should do it? Still rather new to collaboration with github

west root
#

Your problem is the way you've setup your project structure. You've got nested package.json files which have created kind of a mess. You shouldn't be commiting node modules. I've couldn't really undo the setup easily so I've setup a new repo and copied over your files. https://github.com/jamesmarriott/mnk

#

Clone that repo and do npm install in the folder where package.json lives to get the required modules. Be careful only to ever install packages at the root.

#

Let me know when its working for you and I'll delete the repo

vale portal
vale portal
#

Works like a charm! Thank you so much! I'll avoid doing the npm install in anything other than the root in future.