CAFECA-IO / iSunFA

Artificial Intelligence in Financial
https://isunfa.com
GNU General Public License v3.0
0 stars 0 forks source link

🐛 [BUG] - 清除所有 compile warning #2132

Closed TzuHanLiang closed 2 months ago

TzuHanLiang commented 2 months ago

Searched for similar issues

Time of occurrence

Today 9:00 AM

Device

None

Other Device

No response

Device Version

No response

OS

macOS

OS Version

No response

Browsers

No response

Other Browser

No response

Browser Version

No response

Reproduction URL

-

Reproduction steps

1. git clone 'https://github.com/CAFECA-IO/iSunFA.git'
2. git fetch origin develop:develop
3. git checkout develop
4. 'npm i'
5. 'npm run dev'
6. See warning

Current Result

Warning: A title element received an array with more than 1 element as children. In browsers title Elements can only have Text Nodes as children. If the children being rendered output more than a single text node in aggregate the browser will display markup and comments as text in the title and hydration will likely fail and fall back to client rendering
    at title
    at head
    at Head (webpack-internal:///./node_modules/next/dist/pages/_document.js:308:1)
    at html
    at Html (webpack-internal:///./node_modules/next/dist/pages/_document.js:782:132)
    at Document
(node:83496) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
    at node:punycode:3:9
    at BuiltinModule.compileForInternalLoader (node:internal/bootstrap/realm:398:7)
    at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/realm:337:10)
    at loadBuiltinModule (node:internal/modules/helpers:96:7)
    at Module._load (node:internal/modules/cjs/loader:1063:17)
    at wrapModuleLoad (node:internal/modules/cjs/loader:212:19)
    at Module.require (node:internal/modules/cjs/loader:1297:12)
    at mod.require (/Users/tzuhanliang/workspace/iSunFA/node_modules/next/dist/server/require-hook.js:65:28)
    at require (node:internal/modules/helpers:123:16)
    at Object.<anonymous> (/Users/tzuhanliang/workspace/iSunFA/node_modules/node-fetch/node_modules/whatwg-url/lib/url-state-machine.js:2:18)
    at Module._compile (node:internal/modules/cjs/loader:1460:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1544:10)
    at Module.load (node:internal/modules/cjs/loader:1275:32)
    at Module._load (node:internal/modules/cjs/loader:1091:12)
    at wrapModuleLoad (node:internal/modules/cjs/loader:212:19)
(base) tzuhanliang@TZUHANde-MacBook-Pro iSunFA % npm install
npm warn deprecated @types/react-chartjs-2@2.5.7: This is a stub types definition for react-chartjs-2 (https://github.com/gor181/react-chartjs-2). react-chartjs-2 provides its own type definitions, so you don't need @types/react-chartjs-2 installed!
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated npmlog@5.0.1: This package is no longer supported.
npm warn deprecated @humanwhocodes/config-array@0.11.14: Use @eslint/config-array instead
npm warn deprecated abab@2.0.6: Use your platform's native atob() and btoa() methods instead
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated are-we-there-yet@2.0.0: This package is no longer supported.
npm warn deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
npm warn deprecated glob@7.1.7: Glob versions prior to v9 are no longer supported
npm warn deprecated domexception@4.0.0: Use your platform's native DOMException instead
npm warn deprecated gauge@3.0.2: This package is no longer supported.

Screenshots

![Uploading Screenshot 2024-08-20 at 9.46.24 AM.png…]()

Logs

No response

Expected Result

without this sentance 'react-i18next:: You will need to pass in an i18next instance by using initReactI18next'
TzuHanLiang commented 2 months ago
npm ls inflight npmlog @humanwhocodes/config-array @humanwhocodes/object-schema abab rimraf are-we-there-yet glob domexception gauge punycode
Screenshot 2024-08-20 at 5 02 36 PM
TzuHanLiang commented 2 months ago

針對 「react-i18next:: You will need to pass in an i18next instance by using initReactI18next」可以解決的辦法 :

TzuHanLiang commented 2 months ago

punycode 還未解決 took 3hrs

TzuHanLiang commented 2 months ago

更新 husky 從 v4 更新至 v9 doc

TzuHanLiang commented 2 months ago

過期的 packages

Screenshot 2024-08-21 at 5 33 38 PM

暫不更新的原因

原因 1: 版本相容性問題

原因 2: eslint-config-airbnb 的限制

原因 3: 相依性衝突

總結

目前,升級這三個套件會導致相依性衝突和相容性問題。為了保持系統穩定,你應該繼續使用與這些套件相容的 ESLint 版本(如 8.x),並等待相關套件的更新來支持 ESLint 9.x

我們使用的 packages 依賴一下已經 deprecated 的 packages

Screenshot 2024-08-21 at 5 33 55 PM

1. inflight@1.0.6

2. npmlog@5.0.1

3. @humanwhocodes/config-array@0.11.14@humanwhocodes/object-schema@2.0.3

4. abab@2.0.6

5. rimraf@3.0.2

6. are-we-there-yet@2.0.0

7. glob@7.2.3

8. domexception@4.0.0

9. gauge@3.0.2

總結

這些警告主要來自於已棄用的套件,而這些套件大部分都是通過其他上層依賴自動安裝的,因此我們無法單獨更新它們。要解決這些問題,通常需要等待上層依賴更新並移除或替換這些已棄用的子依賴。

TzuHanLiang commented 2 months ago

took 3.5hrs done