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.

Issues using react-localize-redux without redux

See original GitHub issue

Hi !

According to the release notes from 3.0, react-localize-redux is supposed to be usable without using redux. But I seem to be getting issues compiling.

When trying to start a new project with bare bones dependencies:

  "dependencies": {
    "react": "^16.3.2",
    "react-dom": "^16.3.2",
    "react-localize-redux": "^3.3.2"
  },

And a really basic index.jsx:

import React from 'react';
import { render } from 'react-dom';
import { LocalizeProvider } from 'react-localize-redux';

class App extends React.Component<any, any> {
  render() {
    console.log(this.state.store);
    return (
      <LocalizeProvider>
        bloop
      </LocalizeProvider>
    );
  }
}

render(<App />, document.getElementById('root'));

I get compile issues:

ERROR in ./node_modules/react-localize-redux/es/localize.js
Module not found: Error: Can't resolve 'redux' in '[snip]/node_modules/react-localize-redux/es'
 @ ./node_modules/react-localize-redux/es/localize.js 10:0-40
 @ ./node_modules/react-localize-redux/es/index.js

ERROR in ./node_modules/react-localize-redux/es/LocalizeProvider.js
Module not found: Error: Can't resolve 'redux' in '[snip]/node_modules/react-localize-redux/es'
 @ ./node_modules/react-localize-redux/es/LocalizeProvider.js 10:0-15
 @ ./node_modules/react-localize-redux/es/index.js

ERROR in ./node_modules/react-localize-redux/es/utils.js
Module not found: Error: Can't resolve 'redux' in '[snip]/node_modules/react-localize-redux/es'
 @ ./node_modules/react-localize-redux/es/utils.js 4:0-15
 @ ./node_modules/react-localize-redux/es/localize.js
 @ ./node_modules/react-localize-redux/es/index.js

Exact yarn.lock for react-localize-redux:

react-localize-redux@^3.3.2:
  version "3.3.2"
  resolved "https://registry.yarnpkg.com/react-localize-redux/-/react-localize-redux-3.3.2.tgz#cf42a90bdd640bf0fd92f3528f3e1707232cc9dc"
  dependencies:
    create-react-context "^0.2.2"
    flat "^2.0.1"
    prop-types "^15.6.1"
    reselect "^3.0.1"

I quite new at all this, so I’m expecting that I’m doing something wrong 😃

Thanks for any help, Js

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ryandrewjohnsoncommented, Sep 28, 2018

@pixelplant @lyndseybrowning I just pushed removed a few left over redux references I found in the source #129 . Hopefully this takes care of the issue - fixes are published in v3.4.1.

1reaction
pixelplantcommented, Sep 26, 2018

@ryandrewjohnson Nope, still getting this in 3.4.0 Error: Can't resolve 'redux'

Read more comments on GitHub >

github_iconTop Results From Across the Web

FAQ - react-localize-redux
How do I persist active language? · 1. Save active language to local storage · 2. Keep active language in the url.
Read more >
React Localize Redux 3.0 - Medium
I'm happy to announce the latest release of react-localize-redux. New features, new docs, new logo, and now works without Redux by default.
Read more >
react-localize-redux examples - CodeSandbox
Learn how to use react-localize-redux by viewing and forking example apps that make use of react-localize-redux on CodeSandbox. React TypescriptAdding types to ...
Read more >
Localize Your App With React Intl - Better Programming
In short, it is necessary for Translate to handle default translations in HTML but is not included in the react-localize-redux package as it...
Read more >
Top 5 react-localize-redux Code Examples - Snyk
Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues...
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