我尝试在Render上部署一个节点应用程序作为部署服务....但每次都以build failed结束。以下是部署事件的日志:
Jul 8 07:41:12 PM ==> Cloning from https://github.com/nileshp07/Natours...
Jul 8 07:41:15 PM ==> Checking out commit 6b28421ce689c5171b48e0f038cc352471c844e0 in branch main
Jul 8 07:41:19 PM ==> Using Node version 20.4.0 via /opt/render/project/src/package.json
Jul 8 07:41:19 PM ==> Docs on specifying a Node version: https://render.com/docs/node-version
Jul 8 07:41:21 PM ==> Running build command 'npm install'...
Jul 8 07:41:22 PM npm ERR! code ERESOLVE
Jul 8 07:41:22 PM npm ERR! ERESOLVE could not resolve
Jul 8 07:41:22 PM npm ERR!
Jul 8 07:41:22 PM npm ERR! While resolving: eslint-config-airbnb@18.2.1
Jul 8 07:41:22 PM npm ERR! Found: eslint@8.43.0
Jul 8 07:41:22 PM npm ERR! node_modules/eslint
Jul 8 07:41:22 PM npm ERR! dev eslint@"^8.43.0" from the root project
Jul 8 07:41:22 PM npm ERR! peer eslint@"^6.0.0 || ^7.0.0 || >=8.0.0" from @eslint-community/eslint-utils@4.4.0
Jul 8 07:41:22 PM npm ERR! node_modules/@eslint-community/eslint-utils
Jul 8 07:41:22 PM npm ERR! @eslint-community/eslint-utils@"^4.2.0" from eslint@8.43.0
Jul 8 07:41:22 PM npm ERR! 5 more (eslint-config-prettier, eslint-plugin-import, ...)
Jul 8 07:41:22 PM npm ERR!
Jul 8 07:41:22 PM npm ERR! Could not resolve dependency:
Jul 8 07:41:22 PM npm ERR! peer eslint@"^5.16.0 || ^6.8.0 || ^7.2.0" from eslint-config-airbnb@18.2.1
Jul 8 07:41:22 PM npm ERR! node_modules/eslint-config-airbnb
Jul 8 07:41:22 PM npm ERR! dev eslint-config-airbnb@"^18.2.1" from the root project
Jul 8 07:41:22 PM npm ERR!
Jul 8 07:41:22 PM npm ERR! Conflicting peer dependency: eslint@7.32.0
Jul 8 07:41:22 PM npm ERR! node_modules/eslint
Jul 8 07:41:22 PM npm ERR! peer eslint@"^5.16.0 || ^6.8.0 || ^7.2.0" from eslint-config-airbnb@18.2.1
Jul 8 07:41:22 PM npm ERR! node_modules/eslint-config-airbnb
Jul 8 07:41:22 PM npm ERR! dev eslint-config-airbnb@"^18.2.1" from the root project
Jul 8 07:41:22 PM npm ERR!
Jul 8 07:41:22 PM npm ERR! Fix the upstream dependency conflict, or retry
Jul 8 07:41:22 PM npm ERR! this command with --force or --legacy-peer-deps
Jul 8 07:41:22 PM npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
Jul 8 07:41:22 PM npm ERR!
Jul 8 07:41:22 PM npm ERR!
Jul 8 07:41:22 PM npm ERR! For a full report see:
Jul 8 07:41:22 PM npm ERR! /opt/render/.cache/_logs/2023-07-08T14_11_21_566Z-eresolve-report.txt
Jul 8 07:41:22 PM
Jul 8 07:41:22 PM npm ERR! A complete log of this run can be found in: /opt/render/.cache/_logs/2023-07-08T14_11_21_566Z-debug-0.log
Jul 8 07:41:22 PM ==> Build failed 😞
字符串
我想这和我的npm包有关。有人能帮我吗?任何帮助将是感激:)
1条答案
按热度按时间68bkxrlz1#
安装每个软件包的正确版本,这些版本由命令列出
字符串
您已经在项目中安装了
eslint@^8.43.0
,但eslint-config-airbnb@18.2.1
需要eslint
作为其对等依赖项,并且具有兼容版本:'^5.16.0 || ^6.8.0 || ^7.2.0'
。如果您使用的是npm
v7+,它将显示此警告。选择:
1.如果您确定
eslint-config-airbnb@18.2.1
与eslint@^8.43.0
兼容,则可以忽略警告并使用npm install --legacy-peer-deps
。1.正在将
eslint-config-airbnb
软件包升级到最新版本(当前为19.0.4
)1.将
eslint
软件包降级到^7.2.0
版本。1.将
npm
降级到低于7的版本。npm v7.0.0
随附Node.js 15.0.0,这意味着您可以将Node降级到低于15的版本。进一步阅读:Peer Dependencies