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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

v6.1.7 breaks create-react-app production build (and dev too) #267

Closed
ddolcimascolo opened this issue Oct 7, 2022 · 5 comments
Closed

Comments

@ddolcimascolo
Copy link

ddolcimascolo commented Oct 7, 2022

馃悰 Bug Report

v6.1.7 breaks CRA production build with Module not found: Error: Default condition should be last one. Dev server is broken too with the same error

To Reproduce

npx create-react-app i18next-browser-languagedetector-6.1.7
cd i18next-browser-languagedetector-6.1.7/
npm i --save -E i18next-browser-languagedetector@6.1.7

Just import the module anywhere

--- a/src/index.js
+++ b/src/index.js
@@ -3,6 +3,7 @@ import ReactDOM from 'react-dom/client';
 import './index.css';
 import App from './App';
 import reportWebVitals from './reportWebVitals';
+import i from 'i18next-browser-languagedetector';
 
 const root = ReactDOM.createRoot(document.getElementById('root'));
 root.render(

npm run build

Expected behavior

Build succeeds

Your Environment

  • runtime version: Node 16
  • i18next version: Latest
  • os: Ubuntu 20.04
  • any other relevant information
@adrai
Copy link
Member

adrai commented Oct 7, 2022

#266

@adrai
Copy link
Member

adrai commented Oct 7, 2022

@gunters63 can you also check this please?

@ddolcimascolo
Copy link
Author

Reproduction added, though it's really just importing the module 馃槗

@gunters63
Copy link

The new types entry which fixed issue #266 should be moved to the start of its export entry.
The default entry should always be last, as the error says.

adrai added a commit that referenced this issue Oct 7, 2022
@adrai
Copy link
Member

adrai commented Oct 7, 2022

v6.1.8 should fix this

@adrai adrai closed this as completed Oct 7, 2022
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

3 participants