question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: (0 , m.createRoutes) is not a function

See original GitHub issue

Node 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" ] }

screen shot 2018-11-12 at 13 35 52

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:1
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
kuflashcommented, Nov 12, 2018

@marcoseoane unfortunately at the moment 4 version is not supported. Now you can use this is example

0reactions
francisrod01commented, Jan 31, 2019

Related #85.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: (0 , _createStore.default) is not a function
I removed brackets({}) in import and that fixed my problem. You can try this: import createStore from 'redux'.
Read more >
Express Tutorial Part 4: Routes and controllers - MDN Web Docs
First we create routes for a wiki in a module named wiki.js. ... Note: Router functions are Express middleware, which means that they...
Read more >
Office of Data Governance and Transparency - Oregon GEO
toString(36).slice(2),m={getClosestInstanceFromNode:u ... ge.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.
Read more >
Koa.js - Quick Guide - Tutorialspoint
We need to use the Koa-router module to easily create routes in Koa. ... var app = koa(); var _ = router(); _.get('/things/:id([0-9]{5})',...
Read more >
Functional Web Development with React and Redux
Popularity of Functional JavaScript ... This book does not assume any knowledge of React at all. ... TypeError: (0 , _reducers.color) is not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found