n9e / fe

Nightingale frontend
Apache License 2.0
148 stars 57 forks source link

npm build Failed #32

Closed jicki closed 1 year ago

jicki commented 1 year ago
#0 49.47 src/pages/alertRules/Form/Rule/Rule/Log/index.tsx(26,48): error TS2307: Cannot find module 'plus:/datasource/aliyunSLS' or its corresponding type declarations.
#0 49.47 src/pages/alertRules/Form/Rule/Rule/Log/index.tsx(27,52): error TS2307: Cannot find module 'plus:/datasource/elasticsearch' or its corresponding type declarations.
#0 49.47 src/pages/alertRules/Form/Rule/Rule/Metric/index.tsx(27,41): error TS2307: Cannot find module 'plus:/datasource/clickHouse' or its corresponding type declarations.
#0 49.47 src/pages/alertRules/Form/Rule/Rule/Metric/index.tsx(28,39): error TS2307: Cannot find module 'plus:/datasource/influxDB' or its corresponding type declarations.
#0 49.47 src/pages/alertRules/Form/Rule/Rule/index.tsx(21,38): error TS2307: Cannot find module 'plus:/datasource/anomaly' or its corresponding type declarations.
#0 49.47 src/pages/alertRulesBuiltin/index.tsx(93,21): error TS2345: Argument of type 'number | RuleCateType | (() => IterableIterator<RuleCateType>) | (() => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }) | ... 30 more ... | (<A, D extends number = 1>(this: A, depth?: D | undefined) => FlatArray<...>[])' is not assignable to parameter of type 'SetStateAction<RuleCateType | undefined>'.
#0 49.47   Type 'number' is not assignable to type 'SetStateAction<RuleCateType | undefined>'.
#0 49.47 src/pages/dashboard/Editor/QueryEditor/index.tsx(5,43): error TS2307: Cannot find module 'plus:/datasource/aliyunSLS' or its corresponding type declarations.
#0 49.47 src/pages/dashboard/Editor/QueryEditor/index.tsx(6,40): error TS2307: Cannot find module 'plus:/datasource/zabbix' or its corresponding type declarations.
#0 49.47 src/pages/dashboard/Editor/QueryEditor/index.tsx(7,42): error TS2307: Cannot find module 'plus:/datasource/influxDB' or its corresponding type declarations.
#0 49.47 src/pages/dashboard/Renderer/datasource/useQuery.tsx(28,41): error TS2307: Cannot find module 'plus:/datasource/aliyunSLS' or its corresponding type declarations.
#0 49.47 src/pages/dashboard/Renderer/datasource/useQuery.tsx(29,38): error TS2307: Cannot find module 'plus:/datasource/zabbix' or its corresponding type declarations.
#0 49.47 src/pages/dashboard/Renderer/datasource/useQuery.tsx(30,40): error TS2307: Cannot find module 'plus:/datasource/influxDB' or its corresponding type declarations.
#0 49.47 src/pages/dashboardBuiltin/index.tsx(76,21): error TS2345: Argument of type 'number | BoardCateType | (() => IterableIterator<BoardCateType>) | (() => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }) | ... 30 more ... | (<A, D extends number = 1>(this: A, depth?: D | undefined) => FlatArray<...>[])' is not assignable to parameter of type 'SetStateAction<BoardCateType | undefined>'.
#0 49.47   Type 'number' is not assignable to type 'SetStateAction<BoardCateType | undefined>'.
#0 49.47 src/pages/event/LogsDetail/index.tsx(1,40): error TS2307: Cannot find module 'plus:/datasource/aliyunSLS' or its corresponding type declarations.
#0 49.47 src/pages/event/LogsDetail/index.tsx(2,44): error TS2307: Cannot find module 'plus:/datasource/elasticsearch' or its corresponding type declarations.
#0 49.47 src/pages/event/Preview/index.tsx(7,43): error TS2307: Cannot find module 'plus:/datasource/anomaly' or its corresponding type declarations.
#0 49.47 src/pages/event/Preview/index.tsx(8,52): error TS2307: Cannot find module 'plus:/datasource/elasticsearch' or its corresponding type declarations.
#0 49.47 src/pages/event/Preview/index.tsx(9,48): error TS2307: Cannot find module 'plus:/datasource/aliyunSLS' or its corresponding type declarations.
#0 49.47 src/pages/event/Preview/index.tsx(10,49): error TS2307: Cannot find module 'plus:/datasource/influxDB' or its corresponding type declarations.
#0 49.47 src/pages/event/detail.tsx(31,46): error TS2307: Cannot find module 'plus:/datasource/elasticsearch' or its corresponding type declarations.
#0 49.47 src/pages/event/detail.tsx(32,42): error TS2307: Cannot find module 'plus:/datasource/aliyunSLS' or its corresponding type declarations.
#0 49.47 src/pages/event/detail.tsx(33,41): error TS2307: Cannot find module 'plus:/datasource/influxDB' or its corresponding type declarations.
#0 49.47 src/pages/explorer/Explorer.tsx(28,39): error TS2307: Cannot find module 'plus:/datasource/aliyunSLS' or its corresponding type declarations.
#0 49.47 src/pages/explorer/Explorer.tsx(30,40): error TS2307: Cannot find module 'plus:/datasource/clickHouse' or its corresponding type declarations.
#0 49.47 src/pages/explorer/Explorer.tsx(31,36): error TS2307: Cannot find module 'plus:/datasource/zabbix' or its corresponding type declarations.
#0 49.47 src/pages/explorer/Explorer.tsx(32,38): error TS2307: Cannot find module 'plus:/datasource/influxDB' or its corresponding type declarations.
#0 49.47 src/routers/index.tsx(66,39): error TS2307: Cannot find module 'plus:/datasource/anomaly' or its corresponding type declarations.
jsers commented 1 year ago
  1. 贴下 build 的命令,不要执行 build:advanced
  2. 贴下 vite 版本
jicki commented 1 year ago
 > [frontend 5/5] RUN npm install &&     npm run build:
#0 7.132 npm WARN deprecated @codemirror/stream-parser@0.19.9: As of 0.20.0, this package has been merged into @codemirror/language
#0 8.503 npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
#0 9.475 npm WARN deprecated lezer-tree@0.13.2: This package has been replaced by @lezer/common
#0 9.622 npm WARN deprecated lezer@0.13.5: This package has been replaced by @lezer/lr
#0 13.71 npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
#0 32.91 
#0 32.91 added 786 packages in 32s
#0 32.91 
#0 32.91 164 packages are looking for funding
#0 32.91   run `npm fund` for details
#0 32.92 npm notice 
#0 32.92 npm notice New major version of npm available! 8.1.2 -> 9.6.7
#0 32.92 npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.6.7>
#0 32.92 npm notice Run `npm install -g npm@9.6.7` to update!
#0 32.92 npm notice 
#0 33.27 
#0 33.27 > n9e-fe@6.0.0-ga.7 build
#0 33.27 > tsc && cross-env NODE_OPTIONS=--max-old-space-size=4096 vite build
    "vite": "^2.1.5",
    "vite-plugin-react-svg": "^0.2.0"
  }
jsers commented 1 year ago

@jicki pull 下代码,重新试下呢

jicki commented 1 year ago

@jicki pull 下代码,重新试下呢

pull 了最新代码以后~还是报错

#0 23.87 npm notice Run `npm install -g npm@9.6.7` to update!
#0 23.87 npm notice 
#0 24.16 
#0 24.16 > n9e-fe@6.0.0-ga.7 build
#0 24.16 > tsc && cross-env NODE_OPTIONS=--max-old-space-size=4096 vite build
#0 24.16 
#0 43.55 src/pages/alertRulesBuiltin/index.tsx(93,21): error TS2345: Argument of type 'number | RuleCateType | (() => IterableIterator<RuleCateType>) | (() => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }) | ... 30 more ... | (<A, D extends number = 1>(this: A, depth?: D | undefined) => FlatArray<...>[])' is not assignable to parameter of type 'SetStateAction<RuleCateType | undefined>'.
#0 43.55   Type 'number' is not assignable to type 'SetStateAction<RuleCateType | undefined>'.
#0 43.56 src/pages/dashboardBuiltin/index.tsx(76,21): error TS2345: Argument of type 'number | BoardCateType | (() => IterableIterator<BoardCateType>) | (() => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }) | ... 30 more ... | (<A, D extends number = 1>(this: A, depth?: D | undefined) => FlatArray<...>[])' is not assignable to parameter of type 'SetStateAction<BoardCateType | undefined>'.
#0 43.56   Type 'number' is not assignable to type 'SetStateAction<BoardCateType | undefined>'.
jsers commented 1 year ago

是改了内置告警规则的代码吗?看错误信息应该是这部分类型检测报错了

jicki commented 1 year ago

是改了内置告警规则的代码吗?看错误信息应该是这部分类型检测报错了

是指 nightingale 的代码吗? fe 的代码我没有更改。

jsers commented 1 year ago

刚重新安装了下依赖复现了,重新 pull 代码再试下

jicki commented 1 year ago

刚重新安装了下依赖复现了,重新 pull 代码再试下

已经可以 编译 通过了. 感谢