Open ximex opened 1 year ago
Can you please provide a minimal repository so we can reproduce this?
I have confirmed the same issue in my project. Both v2.4.4 and v2.4.5 are affected.
Mine as well. When I run tsc
with version 2.4.5
it crashes with the same error. It runs out of memory. Version 22.4.3
is the latest that works fine
@adrai Same issue on v22.4.6
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Mark as not stale
Still happening on v22.4.8
Is this related to #1857?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Mark as not stale
Minimal repo is now available here: #1901 @adrai. Hope this helps!
I can confirm this is still occurring on v22.4.10
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Please try with i18next v23.0.1 and react-i18next v13.0.0
Hey @esetnik, we really need a reproducible example to investigate what should be the root cause 😢
@pedrodurek sorry I have been trying to build a reproducible example but I cannot even get the example I put together to typecheck cleanly due to https://github.com/i18next/react-i18next/issues/1647 so I cannot provide a full example which demonstrates this issue.
Can you try if it's better with v23.3.0?
Unfortunately no it's the same issue
Unfortunately no it's the same issue
@ximex and for you?
"i18next": "^23.4.2",
"react-i18next": "^13.0.3",
with this versions tested it looks like it is fixed.
So can we close this issue?
For me it is fixed. @esetnik also for you?
I am still experiencing the issue and stuck on the older version until it is resolved. The last version that is able to lint my project without Allocation failed - JavaScript heap out of memory
errors is:
i18next@22.4.3
react-i18next@12.3.1
Yes you may
Sent from my iPhone 14 Pro Max 📲
On Aug 7, 2023, at 12:29 PM, Adriano Raiano @.***> wrote:
So can we close this issue?
— Reply to this email directly, view it on GitHubhttps://github.com/i18next/i18next/issues/1883#issuecomment-1668219515, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADZWDNIBU45QD23UHLWERO3XUEJXBANCNFSM6AAAAAAS5J7FBE. You are receiving this because you commented.Message ID: @.***>
@esetnik seems @pedrodurek is still waiting for an example by you?
@ximex can you tell me which versions of @typescript-eslint
you are using and provide me with your eslint config? I'd like to try to reproduce it using your configs since they are working for you.
it worked with 5.62.0
and also with 6.3.0
the config (@typescript-eslint@^6.3.0
) without the huge list of rules:
module.exports = {
"root": true,
"env": {
"browser": true,
"node": true,
"commonjs": true,
"es2023": true,
"jest/globals": true,
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2023,
"sourceType": "module",
"ecmaFeatures": {
// "impliedStrict": true,
"jsx": true,
},
"project": true,
"extraFileExtensions": [".json"],
},
"settings": {
"react": {
"version": "detect",
},
// "jest": {
// "version": "29",
// },
},
"plugins": [
"@typescript-eslint",
"react",
"react-hooks",
"i18next",
"jest",
"jest-extended",
],
"extends": [
"eslint:recommended",
"plugin:node/recommended",
"plugin:react/jsx-runtime",
],
"rules": {
...
},
};
@ximex do you have @typescript-eslint/no-misused-promises
enabled?
yes
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
please mark as not stale
"i18next": "^23.4.2", "react-i18next": "^13.0.3",
with this versions tested it looks like it is fixed.
I confirm what @ximex said, with theses version, i don't have any more JS heap out of memory
error !! :clap: :raised_hands:
EDIT: after developping more, I got the JS heap out of memory
error... :sob:
We're just upgrading from v22 to @latest v23 (see below) but TSC just die after making any changes and waiting 15sec...
Here our short listed package.json that failed :
"dependencies": { // ... "i18next": "^23.7.7", "i18next-chained-backend": "^4.6.2", "i18next-http-backend": "^2.4.2", "i18next-parser": "^8.9.0", "i18next-resources-to-backend": "^1.2.0", // ... "react-i18next": "^13.5.0" },
Fyi, our
devDependencies
:"devDependencies": { // ... "@typescript-eslint/eslint-plugin": "^5.60.1", "@typescript-eslint/parser": "^5.60.1", // ... "eslint": "^8.43.0", "eslint-config-prettier": "^8.8.0", "eslint-config-standard": "^17.1.0", "eslint-plugin-import": "^2.27.5", "eslint-plugin-no-restricted-imports": "^0.0.0", "eslint-plugin-playwright": "^0.15.3", "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-react": "^7.32.2", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-simple-import-sort": "^10.0.0", "eslint-plugin-unused-imports": "^2.0.0" // ... },
I don't really know how I could provide a reproducible example repository for this sort of bug, sorry...
Sorry about my previous comment, we finally managed to fix our Error: Worker terminated due to reaching memory limit: JS heap out of memory
by increasing virtual memory (NODE_OPTIONS) of node with 8Gb (as explained here).
Working for us with @latest i18next
& react-i18next
:
"dependencies": {
"i18next": "^23.7.7",
"i18next-chained-backend": "^4.6.2",
"i18next-http-backend": "^2.4.2",
"i18next-parser": "^8.9.0",
"i18next-resources-to-backend": "^1.2.0",
// ...
"react-i18next": "^13.5.0"
},
Here our script using vite :
"scripts": {
"start": "export NODE_OPTIONS=--max-old-space-size=8192 && vite",
}
🐛 Bug Report
If i run eslint i got this error since i18next v2.4.4. It comes from the rules "@typescript-eslint/no-misused-promises". I don't know if it is a @typescript-eslint or i18next bug. With v2.4.3 or before there are no problems.
To Reproduce
run eslint with rule "@typescript-eslint/no-misused-promises"
Expected behavior
That eslint runs through again
Your Environment