neko-craft / NekoMaid

A plugin can use Web to manage your MineCraft server.
http://maid.neko-craft.com
GNU Affero General Public License v3.0
191 stars 22 forks source link

[Bug]尝试再本地跑起来 web面板时出现 #49

Open rezochs opened 10 months ago

rezochs commented 10 months ago

image 使用的node版本为v18.17.1 控制台日志 PS C:\Users\lpitiless\Desktop[服务端]悠然人生v1.2x\NekoMaid-master> npm start

nekomaid@0.3.3 start vite --port 1234

VITE v3.2.4 ready in 1477 ms

➜ Local: http://localhost:1234/ ➜ Network: use --host to expose Failed to resolve import "../../minecraftIcons.json" from "web\components\ItemViewer.tsx". Does the file exist? Failed to resolve import "../../minecraftIcons.json" from "web\components\ItemViewer.tsx". Does the file exist? (x2) Failed to resolve import "../../icons.json" from "web\pages\Files.tsx". Does the file exist? Failed to resolve import "../../minecraftIcons.json" from "web\components\ItemViewer.tsx". Does the file exist? Failed to resolve import "../../minecraftIcons.json" from "web\components\ItemViewer.tsx". Does the file exist? (x2) Failed to resolve import "../../minecraftIcons.json" from "web\components\ItemViewer.tsx". Does the file exist? (x3) 04:10:30 [vite] Internal server error: Failed to resolve import "../../minecraftIcons.json" from "web\components\ItemViewer.tsx". Does

在此之前已经执行过npm install 查看npm的时候 languages/nekomaid/zh_CN.tsx:3:23 - error TS2307: Cannot find module '../minecraft/zh_cn.json' or its corresponding type declarations.

3 import minecraft from '../minecraft/zh_cn.json'


web/components/ItemViewer.tsx:10:19 - error TS2307: Cannot find module '../../minecraftIcons.json' or its corresponding type declarations.

10 import icons from '../../minecraftIcons.json'

web/pages/Files.tsx:22:19 - error TS2307: Cannot find module '../../icons.json' or its corresponding type declarations.

22 import icons from '../../icons.json'


web/utils.tsx:81:59 - error TS7006: Parameter 'str' implicitly has an 'any' type.

81         content = minecraft[it.translate].split('%').map((str, j) => {

web/utils.tsx:81:64 - error TS7006: Parameter 'j' implicitly has an 'any' type.

81 content = minecraft[it.translate].split('%').map((str, j) => { ~

Found 5 errors in 4 files.

Errors Files 1 languages/nekomaid/zh_CN.tsx:3 1 web/components/ItemViewer.tsx:10 1 web/pages/Files.tsx:22 2 web/utils.tsx:81