turkyden / lizhi

🎸 李志 (B 仔) 音乐作品跨平台播放器,支持 Web / Mac / Windows / Linux
https://lizhi.turkyden.com
901 stars 81 forks source link

可以请教下作者NodeJS版本么?试着本地跑不起来QAQ #23

Open EternalDung opened 6 months ago

EternalDung commented 6 months ago

试着在本地跑了一下,node从18换到v16.20.2,还一直报错,参考umi的官方文档和咨询AI,解决了这一处又报另外一个加载器错误。 `× Webpack Compiled with some errors in 9.50s

ERROR Failed to compile with 1 errors 21:41:17

error in ./node_modules/@tanstack/virtual-core/dist/esm/index.js

Module parse failed: Unexpected token (218:51) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders | this.notify = (force, sync) => { | var _a, _b;

  const { startIndex, endIndex } = this.range ?? {

| startIndex: void 0, | endIndex: void 0

@ ./node_modules/@tanstack/react-virtual/dist/esm/index.js 3:0-164 4:0-39 4:0-39 21:14-25 34:4-22 35:4-24 36:16-29 43:24-41 44:26-45 45:16-28 @ ./node_modules/@headlessui/react/dist/components/combobox/combobox.js @ ./node_modules/@headlessui/react/dist/headlessui.esm.js @ ./node_modules/react-cmdk/dist/components/CommandPalette.js @ ./node_modules/react-cmdk/dist/index.js @ ./src/layouts/index.tsx @ ./src/.umi/core/routes.ts @ ./src/.umi/umi.ts @ multi ./node_modules/@umijs/preset-built-in/bundled/@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js ./src/.umi/umi.ts

ERROR in ./node_modules/@tanstack/virtual-core/dist/esm/index.js 218:51 Module parse failed: Unexpected token (218:51) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders | this.notify = (force, sync) => { | var _a, _b;

  const { startIndex, endIndex } = this.range ?? {

| startIndex: void 0, | endIndex: void 0 @ ./node_modules/@tanstack/react-virtual/dist/esm/index.js 3:0-164 4:0-39 4:0-39 21:14-25 34:4-22 35:4-24 36:16-29 43:24-41 44:26-45 45:16-28 @ ./node_modules/@headlessui/react/dist/components/combobox/combobox.js @ ./node_modules/@headlessui/react/dist/headlessui.esm.js @ ./node_modules/react-cmdk/dist/components/CommandPalette.js @ ./node_modules/react-cmdk/dist/index.js @ ./src/layouts/index.tsx @ ./src/.umi/core/routes.ts @ ./src/.umi/umi.ts @ multi ./node_modules/@umijs/preset-built-in/bundled/@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js ./src/.umi/umi.ts`

NriotHrreion commented 1 month ago

原因是部分依赖版本过时,已经在 #24 修复了。现在用Node.js 20就可以运行这个项目,不用回退版本