reactjs - installing 'react-router' gives inconsistent version -
i installed react router doing :
npm install react-router
what installed me not consistent tutorials have read on internet. 1 example : https://css-tricks.com/learning-react-router/
for start, missing indexroute. indexroute? cannot seem of examples working.
when install package like
npm install react-router it installs latest package available on npm repository. if see package.json, have version react router 4.x.x doesn't have indexroute
you should install v3.x.x
to that, remove entry react-router package.json , delete node_modules.
now run
npm install followed by
npm install -s react-router@3.x.x
Comments
Post a Comment