Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gnato opened this issue May 15, 2019 · 0 comments

Comments

@gnato
Copy link

gnato commented May 15, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant