TypeError: (0 , m.createRoutes) is not a function
See original GitHub issueNode Version: v8.12.0 Create-React-App
I have replicated the way it is used in the example, and get the error mentioned in the issue title, if there is any information that I have failed to provide that would be of use to you please notify me and I will take a look and list here.
routes.jsx
import React from 'react'; import { Route, Redirect } from 'react-router' export default ( <Route> <Route path='/' /> <Route path='/about' /> <Route path='/projects'> <Route path=':projectName'> <Route path='view' /> </Route> </Route> <Route path='/contacts' /> <Route path='/auth' /> <Redirect from='/home' to='/' /> <Route path='*' /> </Route> );
sitemap-builder.js
require('babel-register') const router = require('./routes').default const Sitemap = require('react-router-sitemap').default ( new Sitemap(router) .build('http://recruitd.com') .save('./sitemap.xml') )
.babelrc
{ "ignore": [ "node_modules/**/*" ], "presets": [ "es2015", "react" ] }
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:9 (3 by maintainers)
Top GitHub Comments
@marcoseoane unfortunately at the moment 4 version is not supported. Now you can use this is example
Related #85.