Skip to content

Uncaught TypeError: (0 , _reactI18nRouting.defaultUnprefixed) is not a function #22

@gnato

Description

@gnato

I'm trying to configure my app using the basic configuration of ReactI18nRouing described in https://github.com/FriendsOfECMAScript/ReactI18nRouting/blob/master/docs/basic_usage.md

First I had an issues with running webpack (described here: https://stackoverflow.com/questions/56144968/node-modules-outside-of-the-project-directory-are-not-transpiled-by-babel-7).

Now webpack is generating files properly, but after page refresh I have the following error:

app.jsx:15 Uncaught TypeError: (0 , _reactI18nRouting.defaultUnprefixed) is not a function
    at Object../assets/js/app.jsx (app.jsx:15)
    at __webpack_require__ (bootstrap:78)
    at checkDeferredModules (bootstrap:45)
    at Array.webpackJsonpCallback [as push] (bootstrap:32)
    at app.js:1

How this can be fixed?

My configuration of webpack / babel was described in the stackoverflow question. The only change that I've done in webpack.config.js is:

config.module.rules.push({
  test: /\.js$/,
  include: [/node_modules\/@foes/],
  loader: 'babel-loader',
  options: {
    rootMode: 'upward'
  }
});

The code of my app.jsx is just copy-pased from your basic_usage.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions