npm 渲染:部署失败

7vhp5slm  于 2023-08-06  发布在  其他
关注(0)|答案(1)|浏览(129)

我尝试在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包有关。有人能帮我吗?任何帮助将是感激:)

68bkxrlz

68bkxrlz1#

安装每个软件包的正确版本,这些版本由命令列出

$ npm view  eslint-config-airbnb@18.2.1 peerDependencies
{
  eslint: '^5.16.0 || ^6.8.0 || ^7.2.0',
  'eslint-plugin-import': '^2.22.1',
  'eslint-plugin-jsx-a11y': '^6.4.1',
  'eslint-plugin-react': '^7.21.5',
  'eslint-plugin-react-hooks': '^4 || ^3 || ^2.3.0 || ^1.7.0'
}

字符串
您已经在项目中安装了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.1eslint@^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

相关问题