stakeswky / fastgpt-admin

fastgpt项目的简略后台
Apache License 2.0
65 stars 13 forks source link

运行 #2

Open hcj5206 opened 1 year ago

hcj5206 commented 1 year ago

image

当访问127.0.0.1:3001 时提示Cannot GET /

scriptboy1990 commented 1 year ago

一样的报错~

stakeswky commented 1 year ago

后台的地址是127.0.0.1:5173,3001监听的是接口端口

scriptboy1990 commented 1 year ago

(base) netease@hih-d-24204:/data/github/fastgpt-admin$ pnpm i && pnpm dev Lockfile is up to date, resolution step is skipped Already up to date Done in 657ms

kbgpt-deafult@0.0.0 dev /data/github/fastgpt-admin concurrently "vite" "npm run start:api"

[0] failed to load config from /data/github/fastgpt-admin/vite.config.ts [0] error when starting dev server: [0] TypeError: Cannot redefine property: File [0] at Function.defineProperty () [0] at Object. (/data/github/fastgpt-admin/node_modules/.pnpm/@babel+core@7.22.15/node_modules/@babel/core/lib/index.js:7:8) [0] at Module._compile (node:internal/modules/cjs/loader:1241:14) [0] at Module._extensions..js (node:internal/modules/cjs/loader:1295:10) [0] at Module.load (node:internal/modules/cjs/loader:1091:32) [0] at Module._load (node:internal/modules/cjs/loader:938:12) [0] at Module.require (node:internal/modules/cjs/loader:1115:19) [0] at require (node:internal/modules/helpers:130:18) [0] at Object. (/data/github/fastgpt-admin/node_modules/.pnpm/@babel+core@7.22.15/node_modules/@babel/core/lib/config/helpers/config-api.js:16:14) [0] at Module._compile (node:internal/modules/cjs/loader:1241:14) [0] vite exited with code 1 [1] [1] > kbgpt-deafult@0.0.0 start:api [1] > node server.js [1] [1] Server is running on port 3001 [1] Connected to MongoDB successfully!

没有看到5173的

scriptboy1990 commented 1 year ago

node.js从那个latest换成了lts,倒是可以看到5173端口的log,但是有新的报错。 [1] > kbgpt-deafult@0.0.0 start:api [1] > node server.js [1] [0] [0] VITE v4.4.9 ready in 271 ms [0] [0] ➜ Local: http://localhost:5173/ [0] ➜ Network: use --host to expose [0] Error: The following dependencies are imported but could not be resolved: [0] [0] @arco-design/web-react (imported by /data/github/fastgpt-admin/src/Dashboard.tsx) [0] react-i18next (imported by /data/github/fastgpt-admin/src/Dashboard.tsx) [0] [0] Are they installed? [0] at file:///data/github/fastgpt-admin/node_modules/.pnpm/vite@4.4.9/node_modules/vite/dist/node/chunks/dep-df561101.js:45705:23 [0] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [0] at async file:///data/github/fastgpt-admin/node_modules/.pnpm/vite@4.4.9/node_modules/vite/dist/node/chunks/dep-df561101.js:45114:38 [1] Server is running on port 3001 [1] Connected to MongoDB successfully! [0] Failed to resolve import "@arco-design/web-react" from "src/Dashboard.tsx". Does the file exist? [0] 9:47:38 PM [vite] Internal server error: Failed to resolve import "@arco-design/web-react" from "src/Dashboard.tsx". Does the file exist? [0] Plugin: vite:import-analysis [0] File: /data/github/fastgpt-admin/src/Dashboard.tsx:8:7 [0] 15 | } [0] 16 | var _s = $RefreshSig$(), _s2 = $RefreshSig$(); [0] 17 | import { Card, Link, Space, Grid, Divider, Typography } from "@arco-design/web-react"; [0] | ^ [0] 18 | import { IconApps, IconUser, IconUserGroup } from "tushan/icon"; [0] 19 | import React, { useState, useEffect } from "react"; [0] at formatError (file:///data/github/fastgpt-admin/node_modules/.pnpm/vite@4.4.9/node_modules/vite/dist/node/chunks/dep-df561101.js:43993:46) [0] at TransformContext.error (file:///data/github/fastgpt-admin/node_modules/.pnpm/vite@4.4.9/node_modules/vite/dist/node/chunks/dep-df561101.js:43989:19) [0] at normalizeUrl (file:///data/github/fastgpt-admin/node_modules/.pnpm/vite@4.4.9/node_modules/vite/dist/node/chunks/dep-df561101.js:41801:33) [0] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [0] at async file:///data/github/fastgpt-admin/node_modules/.pnpm/vite@4.4.9/node_modules/vite/dist/node/chunks/dep-df561101.js:41945:47 [0] at async Promise.all (index 3) [0] at async TransformContext.transform (file:///data/github/fastgpt-admin/node_modules/.pnpm/vite@4.4.9/node_modules/vite/dist/node/chunks/dep-df561101.js:41870:13) [0] at async Object.transform (file:///data/github/fastgpt-admin/node_modules/.pnpm/vite@4.4.9/node_modules/vite/dist/node/chunks/dep-df561101.js:44283:30) [0] at async loadAndTransform (file:///data/github/fastgpt-admin/node_modules/.pnpm/vite@4.4.9/node_modules/vite/dist/node/chunks/dep-df561101.js:54950:29) [0] at async viteTransformMiddleware (file:///data/github/fastgpt-admin/node_modules/.pnpm/vite@4.4.9/node_modules/vite/dist/node/chunks/dep-df561101.js:64345:32)