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.

Build failed with react-i18next@6.0.1

See original GitHub issue

Hello, I was using react-i18next5.4.1 and updated to react-i18next@6.0.1. In my local device, it builds just fine but when I try to build with docker I get this error message below. I check the dist folder in node_modules and found out that in react-i18next/src/index.js imports Trans class from ./Trans which should be ./trans. Let me know if I’m correct about this or not.

./node_modules/react-i18next/dist/es/index.js
Module not found: Error: Can't resolve './Interpolate' in '/home/release/code/node_modules/react-i18next/dist/es'
resolve './Interpolate' in '/home/release/code/node_modules/react-i18next/dist/es'
  using description file: /home/release/code/node_modules/react-i18next/package.json (relative path: ./dist/es)
    Field 'browser' doesn't contain a valid alias configuration
  after using description file: /home/release/code/node_modules/react-i18next/package.json (relative path: ./dist/es)
    using description file: /home/release/code/node_modules/react-i18next/package.json (relative path: ./dist/es/Interpolate)
      no extension
        Field 'browser' doesn't contain a valid alias configuration
        /home/release/code/node_modules/react-i18next/dist/es/Interpolate doesn't exist
      *
        Field 'browser' doesn't contain a valid alias configuration
        /home/release/code/node_modules/react-i18next/dist/es/Interpolate* doesn't exist
      .js
        Field 'browser' doesn't contain a valid alias configuration
        /home/release/code/node_modules/react-i18next/dist/es/Interpolate.js doesn't exist
      .css
        Field 'browser' doesn't contain a valid alias configuration
        /home/release/code/node_modules/react-i18next/dist/es/Interpolate.css doesn't exist
      .html
        Field 'browser' doesn't contain a valid alias configuration
        /home/release/code/node_modules/react-i18next/dist/es/Interpolate.html doesn't exist
      as directory
        /home/release/code/node_modules/react-i18next/dist/es/Interpolate doesn't exist
[/home/release/code/node_modules/react-i18next/dist/es/Interpolate]
[/home/release/code/node_modules/react-i18next/dist/es/Interpolate*]
[/home/release/code/node_modules/react-i18next/dist/es/Interpolate.js]
[/home/release/code/node_modules/react-i18next/dist/es/Interpolate.css]
[/home/release/code/node_modules/react-i18next/dist/es/Interpolate.html]
[/home/release/code/node_modules/react-i18next/dist/es/Interpolate]
 @ ./node_modules/react-i18next/dist/es/index.js 3:0-55
 @ multi react react-dom react-router react-redux react-i18next react-router-dom react-router-redux redux redux-thunk request raven-js bluebird
./node_modules/react-i18next/dist/es/index.js
Module not found: Error: Can't resolve './Trans' in '/home/release/code/node_modules/react-i18next/dist/es'
resolve './Trans' in '/home/release/code/node_modules/react-i18next/dist/es'
  using description file: /home/release/code/node_modules/react-i18next/package.json (relative path: ./dist/es)
    Field 'browser' doesn't contain a valid alias configuration
  after using description file: /home/release/code/node_modules/react-i18next/package.json (relative path: ./dist/es)
    using description file: /home/release/code/node_modules/react-i18next/package.json (relative path: ./dist/es/Trans)
      no extension
        Field 'browser' doesn't contain a valid alias configuration
        /home/release/code/node_modules/react-i18next/dist/es/Trans doesn't exist
      *
        Field 'browser' doesn't contain a valid alias configuration
        /home/release/code/node_modules/react-i18next/dist/es/Trans* doesn't exist
      .js
        Field 'browser' doesn't contain a valid alias configuration
        /home/release/code/node_modules/react-i18next/dist/es/Trans.js doesn't exist
      .css
        Field 'browser' doesn't contain a valid alias configuration
        /home/release/code/node_modules/react-i18next/dist/es/Trans.css doesn't exist
      .html
        Field 'browser' doesn't contain a valid alias configuration
        /home/release/code/node_modules/react-i18next/dist/es/Trans.html doesn't exist
      as directory
        /home/release/code/node_modules/react-i18next/dist/es/Trans doesn't exist
[/home/release/code/node_modules/react-i18next/dist/es/Trans]
[/home/release/code/node_modules/react-i18next/dist/es/Trans*]
[/home/release/code/node_modules/react-i18next/dist/es/Trans.js]
[/home/release/code/node_modules/react-i18next/dist/es/Trans.css]
[/home/release/code/node_modules/react-i18next/dist/es/Trans.html]
[/home/release/code/node_modules/react-i18next/dist/es/Trans]
 @ ./node_modules/react-i18next/dist/es/index.js 4:0-43

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
radenocommented, Sep 28, 2017

@jamuhl no problem. Mistakes just happens, no one avoids them. Thank you for great library! 😃 👍

0reactions
YukSeungChancommented, Sep 28, 2017

Thanks !

Read more comments on GitHub >

github_iconTop Results From Across the Web

Trans Component - react-i18next documentation
Let's say you want to create following HTML output: Hello Arthur, you have 42 unread messages. Go to messages. Before: Your untranslated React...
Read more >
React i18next fails to load translation after in build
I'm using the react build folder inside Django project. It works fine on localhost:3000 only which is crazy but once i try to...
Read more >
react-i18next | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >
A Guide to React Localization with i18next | Phrase
React -i18next is a powerful set of components, hooks, and plugins that sit on top of i18next. Learn how to use it to...
Read more >
react native reanimated cmake | The Search Engine You Control
* What went wrong: Execution failed for task ':app:mergeDebugNativeLibs'. > A failure occurred while executing com.android.build.gradle.internal.tasks.
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