DB-GPT-Web
DB-GPT-Web copied to clipboard
[BUG] Cannot install with NPM
Describe the bug Run 'npm install' and cannot install dependencies. Here is the cmd output:
nup Failed to remove some directories [
npm WARN cleanup [
npm WARN cleanup 'D:\\工作月度整理\\2024-04\\参考DBGPT代码\\DB-GPT-Web\\node_modules',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'D:\工作月度 整理\2024-04\参考DBGPT代码\DB-GPT-Web\node_modules\next\dist\compiled'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'D:\\工作月度整理\\2024-04\\参考DBGPT代码\\DB-GPT-Web\\node_modules\\next\\dist\\compiled'
npm WARN cleanup }
npm ERR! code ETIMEDOUT
npm ERR! syscall connect
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npmmirror.com/zustand/-/zustand-4.5.0.tgz failed, reason: connect ETIMEDOUT 182.242.63.201:443
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
To Reproduce Steps to reproduce the behavior:
- Move into project folder.
- Run npm install
Expected behavior
Dependencies can be installed and then build static files with npm run compile
Screenshots Not available.
Desktop (please complete the following information): Microsoft Windows 11 10.0.22000
Smartphone (please complete the following information): [ X ] Additional context Nodejs and NPM version: nodejs - v20.12.2 npm - 10.5.0 which satisfied the requirements.
出现同样问题,尝试各种办法无效
出现同样问题,尝试各种办法无效
Salut, pareil pour moi, impossible de finir l'installation des dépendances ? comment faire ?
Tester sur Windows 10 & 11 / UPDATE > react Version=18.2.0
Creer: .env pour Conda Python=3.10
conda create -n dev_dbgpt python=3.10 -y && conda activate dev_dbgpt
Installer: github.com/eosphoros-ai/DB-GPT-Web.git
git clone https://github.com/eosphoros-ai/DB-GPT-Web.git && cd DB-GPT-Web
SUPPRIMER package-lock.json
Creer le fichier: .npmrc
Créez un fichier .npmrc dans le répertoire racine de votre projet
(s'il n'existe pas déjà).
Ajoutez les lignes suivantes au fichier .npmrc :
.npmrc registry=http://registry.npmjs.org/ legacy-peer-deps=true
Creer le fichier: resolutions.json
Créez un fichier resolutions.json dans le répertoire racine de votre projet. Dans le fichier resolutions.json, spécifiez les versions des dépendances conflictuelles que vous souhaitez utiliser.
resolutions.json { "react": "18.3.1" }
Installer: "npm-force-resolutions"
npm install --save-dev npm-force-resolutions --force
Installer: @emotion/react @emotion/styled
npm install @emotion/react --force npm install @emotion/styled --force npm install @mui/material --force
Lancer: npx npm-force-resolution
npx npm-force-resolutions
Installer: "react": "18.3.0
npm install
Update: browserslist
npx update-browserslist-db@latest
Lancer: npm run dev (Front-end)
npm run dev
Lockfile a été corrigé avec succès, veuillez exécuter "npm install" encore une fois pour installer les dépendances correctement ets'assurer que les dépendances @next/swc sont téléchargées.
Acceder à l'interface de DB-GPT et commencer à travailler.
http://localhost:3000/
Utiliser dans DB-GPT
npm run compile
copier le fichier de compilation
et le Placer dans le dictionnaire de fichiers statiques de DB-GPT
cp -rf out/* ../dbgpt/app/static
Liens Utiles : https://semver.npmjs.com https://www.npmjs.com/