Chat2DB
Chat2DB copied to clipboard
npm install 安装失败,依赖冲突
node版本:v16.19.1
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/monaco-editor
npm ERR! monaco-editor@"^0.34.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer monaco-editor@"^0.36.1" from [email protected]
npm ERR! node_modules/react-monaco-editor
npm ERR! react-monaco-editor@"^0.52.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! /Users/dubaoquan/.npm/_logs/2023-07-04T06_23_49_266Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in: /Users/dubaoquan/.npm/_logs/2023-07-04T06_23_49_266Z-debug-0.log
log日志:
# npm resolution error report
While resolving: [email protected]
Found: [email protected]
node_modules/monaco-editor
monaco-editor@"^0.34.0" from the root project
Could not resolve dependency:
peer monaco-editor@"^0.36.1" from [email protected]
node_modules/react-monaco-editor
react-monaco-editor@"^0.52.0" from the root project
Fix the upstream dependency conflict, or retry
this command with --force or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.
我听从了建议,加了--force,能运行。但不知道有没有其他问题。
建议使用yarn
# config .npmrs
electron_mirror=https://npm.taobao.org/mirrors/electron/
registry=https://registry.npmmirror.com/
yarn install --force
[^_^]:success Saved lockfile. $ umi setup info - [你知道吗?] 遇到难解的配置问题,试试从 Umi FAQ 中寻找答案,详见 https://umijs.org/docs/introduce/faq info - generate files info - Preparing... Done in 199.59s.
npm run build:prod
[^^]:> [email protected] build:prod [^^]:> npm run build:web:prod && npm run build:main:prod [^^]: [^^]: [^^]:> [email protected] build:web:prod [^^]:> cross-env UMI_ENV=prod cross-env APP_VERSION=${npm_config_appVersion} cross-env APP_PORT=${npm_config_appPort} umi build [^^]: [^^]:info - [你知道吗?] 编写 src/loading.(jsx|tsx) 可以自定义页面的加载动画。 [^^]:info - Umi v4.0.72 [^^]:info - Preparing... [^^]: [^^]:✔ Webpack [^^]: Compiled successfully in 1.05m [^^]: [^^]:info - Memory Usage: 1129.2 MB (RSS: 1289.86 MB) [^^]:info - [esbuildHelperChecker] Checking esbuild helpers from your dist files... [^^]:info - [esbuildHelperChecker] No conflicts found. [^^]: [^^]:● Webpack █████████████████████████ cache (99%) [^^]: shutdown [^^]: [^^]: [^^]:info - File sizes after gzip: [^^]: [^^]: 774.46 kB dist\552.async.js [^^]: 591.02 kB dist\392.async.js [^^]: 209.63 kB dist\umi.js [^^]: 130.12 kB dist\832.async.js [^^]: 74.67 kB dist\editor.worker.js [^^]: 28.63 kB dist\p__main__index.async.js [^^]: 22.03 kB dist\72.async.js [^^]: 14.02 kB dist\552.chunk.css [^^]: 8.37 kB dist\p__main__index.chunk.css [^^]: 4.51 kB dist\996.async.js [^^]: 4.06 kB dist\961.async.js [^^]: 2.57 kB dist\p__test__index.chunk.css [^^]: 2.55 kB dist\layouts__index.chunk.css [^^]: 2.13 kB dist\p__test__index.async.js [^^]: 179 B dist\p__demo__index.async.js [^^]: [^^]:event - Build index.html [^^]: [^^]:> [email protected] build:main:prod [^^]:> cross-env NODE_ENV=production electron-builder [^^]: [^^]: • electron-builder version=23.6.0 os=10.0.19045 [^^]: • loaded configuration file=package.json ("build" field) [^^]: • description is missed in the package.json appPackageFile=D:\Desktop\Chat2DB\chat2db-client\package.json [^^]: • writing effective config file=release\builder-effective-config.yaml [^^]: • packaging platform=win32 arch=x64 electron=20.1.4 appOutDir=release\win-unpacked [^^]: • downloading url=https://npm.taobao.org/mirrors/electron/20.1.4/electron-v20.1.4-win32-x64.zip size=94 MB parts=8 [^^]: • downloaded url=https://npm.taobao.org/mirrors/electron/20.1.4/electron-v20.1.4-win32-x64.zip duration=5.672s [^^]: • asar usage is disabled — this is strongly not recommended solution=enable asar and use asarUnpack to unpack files that must be externally available [^^]: • asar usage is disabled — this is strongly not recommended solution=enable asar and use asarUnpack to unpack files that must be externally available [^^]: • downloading url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.6.0/winCodeSinCodeSign-2.6.0.7z size=5.6 MB parts=1 [^^]: • downloaded url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.6.0/winCodeSinCodeSign-2.6.0.7z duration=23.274s [^^]: • building target=nsis file=release\Chat2DB Setup 1.0.0.exe archs=x64 oneClick=false perMachine=false [^^]: • downloading url=https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-3.0.4.1/nsis-3.0.4.1..0.4.1.7z size=1.3 MB parts=1 [^^]: • downloaded url=https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-3.0.4.1/nsis-3.0.4.1..0.4.1.7z duration=31.746s [^^]: • downloading url=https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-resources-3.4.1/nsis-1/nsis-resources-3.4.1.7z size=731 kB parts=1 [^^]: • downloaded url=https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-resources-3.4.1/nsis-1/nsis-resources-3.4.1.7z duration=13.419s [^^]: • building block map blockMapFile=release\Chat2DB Setup 1.0.0.exe.blockmap
建议使用yarn安装