Build failed with react-i18next@6.0.1
See original GitHub issueHello, 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:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top 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 >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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

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