Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Cannot install with NPM #91

Open
molobaba opened this issue Apr 15, 2024 · 4 comments
Open

[BUG] Cannot install with NPM #91

molobaba opened this issue Apr 15, 2024 · 4 comments

Comments

@molobaba
Copy link

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:

  1. Move into project folder.
  2. 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.

@jiang-taixin
Copy link

出现同样问题,尝试各种办法无效

1 similar comment
@chenxin2017
Copy link

出现同样问题,尝试各种办法无效

@patriote2047
Copy link

Salut, pareil pour moi, impossible de finir l'installation des dépendances ? comment faire ?

@patriote2047
Copy link

patriote2047 commented Jun 13, 2024

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants