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

Can't run using 15.0.1 #1800

Closed
maulanauls opened this issue Sep 12, 2024 · 8 comments
Closed

Can't run using 15.0.1 #1800

maulanauls opened this issue Sep 12, 2024 · 8 comments

Comments

@maulanauls
Copy link

maulanauls commented Sep 12, 2024

🐛 Bug Report

I try install using react-i18next using version 15.0.1 but cant start error when running please help to fix this issue ?

./node_modules/react-i18next/dist/es/context.js
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:

'??' !== '||'
    at Array.forEach (<anonymous>)

Environment

  • runtime version: i.e. node v20, deno, browser xy
  • i18next version: i.e. 15.0.1
  • os: Mac
@adrai
Copy link
Member

adrai commented Sep 12, 2024

#1797

//cc @VIKTORVAV99

@VIKTORVAV99
Copy link
Contributor

@maulanauls can you start by filling out your actual runtime environment?

@maulanauls
Copy link
Author

maulanauls commented Sep 12, 2024

@maulanauls can you start by filling out your actual runtime environment?

`Failed to compile.

./node_modules/react-i18next/dist/es/context.js
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:

'??' !== '||'
at Array.forEach ()`

{ "name": "gp_monitoring", "version": "0.1.0", "private": true, "dependencies": { "@material-ui/core": "^3.8.1", "axios": "^0.19.0", "base-64": "^0.1.0", "i18next": "^23.12.3", "i18next-browser-languagedetector": "^8.0.0", "i18next-http-backend": "^2.5.2", "plotly.js": "^1.55.1", "plotly.js-basic-dist": "^1.55.1", "qrcode.react": "^1.0.0", "query-string": "^6.8.2", "react": "^16.3.0", "react-date-picker": "^7.2.0", "react-dom": "^16.7.0", "react-i18next": "^15.0.1", "react-plotly.js": "^2.4.0", "react-rating": "^1.6.2", "react-router-dom": "^4.3.1", "react-scripts": "2.1.2", "react-spinners": "^0.10.6", "react-switch": "^4.1.0", "react-time-picker": "^3.2.0" }, "scripts": { "start": "set PORT=1991 && react-scripts start", "dev": "export $(grep -vE '^(#|##)' .env.local | xargs) && PORT=1991 NODE_OPTIONS=--openssl-legacy-provider react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" }, "eslintConfig": { "extends": "react-app" }, "browserslist": [ ">0.2%", "not dead", "not ie <= 11", "not op_mini all" ], "devDependencies": { "@babel/plugin-proposal-class-properties": "^7.18.6" } }

Environment

  • runtime version: i.e. node v20, vscode, browser google chrome
  • i18next version: i.e. 15.0.1
  • os: Mac

https://ibb.co.com/DpJ6840

@VIKTORVAV99
Copy link
Contributor

VIKTORVAV99 commented Sep 12, 2024

@maulanauls can you start by filling out your actual runtime environment?

`Failed to compile.

./node_modules/react-i18next/dist/es/context.js

AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:

'??' !== '||'

at Array.forEach (<anonymous>)`

`{

"name": "gp_monitoring",

"version": "0.1.0",

"private": true,

"dependencies": {

"@material-ui/core": "^3.8.1",

"axios": "^0.19.0",

"base-64": "^0.1.0",

"i18next": "^23.12.3",

"i18next-browser-languagedetector": "^8.0.0",

"i18next-http-backend": "^2.5.2",

"plotly.js": "^1.55.1",

"plotly.js-basic-dist": "^1.55.1",

"qrcode.react": "^1.0.0",

"query-string": "^6.8.2",

"react": "^16.3.0",

"react-date-picker": "^7.2.0",

"react-dom": "^16.7.0",

"react-i18next": "^15.0.1",

"react-plotly.js": "^2.4.0",

"react-rating": "^1.6.2",

"react-router-dom": "^4.3.1",

"react-scripts": "2.1.2",

"react-spinners": "^0.10.6",

"react-switch": "^4.1.0",

"react-time-picker": "^3.2.0"

},

"scripts": {

"start": "set PORT=1991 && react-scripts start",

"dev": "export $(grep -vE '^(#|##)' .env.local | xargs) && PORT=1991 NODE_OPTIONS=--openssl-legacy-provider react-scripts start",

"build": "react-scripts build",

"test": "react-scripts test",

"eject": "react-scripts eject"

},

"eslintConfig": {

"extends": "react-app"

},

"browserslist": [

">0.2%",

"not dead",

"not ie <= 11",

"not op_mini all"

],

"devDependencies": {

"@babel/plugin-proposal-class-properties": "^7.18.6"

}

}

`

Environment

  • runtime version: i.e. node v20, vscode, browser google chrome

  • i18next version: i.e. 15.0.1

  • os: Mac

https://ibb.co.com/DpJ6840

That's just the error and configs, what's the environment you're running this in?

@maulanauls
Copy link
Author

@maulanauls can you start by filling out your actual runtime environment?

`Failed to compile.
./node_modules/react-i18next/dist/es/context.js
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
'??' !== '||'

at Array.forEach (<anonymous>)`

`{
"name": "gp_monitoring",
"version": "0.1.0",
"private": true,
"dependencies": {

"@material-ui/core": "^3.8.1",

"axios": "^0.19.0",

"base-64": "^0.1.0",

"i18next": "^23.12.3",

"i18next-browser-languagedetector": "^8.0.0",

"i18next-http-backend": "^2.5.2",

"plotly.js": "^1.55.1",

"plotly.js-basic-dist": "^1.55.1",

"qrcode.react": "^1.0.0",

"query-string": "^6.8.2",

"react": "^16.3.0",

"react-date-picker": "^7.2.0",

"react-dom": "^16.7.0",

"react-i18next": "^15.0.1",

"react-plotly.js": "^2.4.0",

"react-rating": "^1.6.2",

"react-router-dom": "^4.3.1",

"react-scripts": "2.1.2",

"react-spinners": "^0.10.6",

"react-switch": "^4.1.0",

"react-time-picker": "^3.2.0"

},
"scripts": {

"start": "set PORT=1991 && react-scripts start",

"dev": "export $(grep -vE '^(#|##)' .env.local | xargs) && PORT=1991 NODE_OPTIONS=--openssl-legacy-provider react-scripts start",

"build": "react-scripts build",

"test": "react-scripts test",

"eject": "react-scripts eject"

},
"eslintConfig": {

"extends": "react-app"

},
"browserslist": [

">0.2%",

"not dead",

"not ie <= 11",

"not op_mini all"

],
"devDependencies": {

"@babel/plugin-proposal-class-properties": "^7.18.6"

}
}
`

Environment

  • runtime version: i.e. node v20, vscode, browser google chrome
  • i18next version: i.e. 15.0.1
  • os: Mac

https://ibb.co.com/DpJ6840

That's just the error and configs, what's the environment you're running this in?

This is correct config or not because this is issue on module node

`import i18n from 'i18next';
import en from "../local/en.json";
import Backend from 'i18next-http-backend';
import LanguageDetector from 'i18next-browser-languagedetector';
import { initReactI18next } from 'react-i18next';

i18n
.use(initReactI18next) // passes i18n down to react-i18next
.init({
// the translations
// (tip move them in a JSON file and import them,
// or even better, manage them via a UI: https://react.i18next.com/guides/multiple-translation-files#manage-your-translations-with-a-management-gui)
resources: {
en: {
translation: {
"welcome to react": "welcome to react and react-i18next"
}
}
},
lng: "en", // if you're using a language detector, do not define the lng option
fallbackLng: "en",

    interpolation: {
        escapeValue: false // react already safes from xss => https://www.i18next.com/translation-function/interpolation#unescape
    }
});

export default i18n;`

@maulanauls
Copy link
Author

`import i18n from 'i18next';
import en from "../local/en.json";
import Backend from 'i18next-http-backend';
import LanguageDetector from 'i18next-browser-languagedetector';
import { initReactI18next } from 'react-i18next';

i18n
.use(initReactI18next) // passes i18n down to react-i18next
.init({
// the translations
// (tip move them in a JSON file and import them,
// or even better, manage them via a UI: https://react.i18next.com/guides/multiple-translation-files#manage-your-translations-with-a-management-gui)
resources: {
en: {
translation: {
"welcome to react": "welcome to react and react-i18next"
}
}
},
lng: "en", // if you're using a language detector, do not define the lng option
fallbackLng: "en",

    interpolation: {
        escapeValue: false // react already safes from xss => https://www.i18next.com/translation-function/interpolation#unescape
    }
});

export default i18n;`

This is i18n config js

@adrai
Copy link
Member

adrai commented Sep 12, 2024

Please create a minimal reproducible example repository/project on github that shows your issue.

We can't help you if you just send code snippets, sorry.

@maulanauls
Copy link
Author

I will close this issue this problem because not support on
"react-scripts": "2.1.2"
Thank you

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