因此,自从项目启动以来,部署从来没有问题,今天不知从哪里冒出来的这条消息开始出现在vercel上。
应用程序是使用下一个js编写的。
我找了又找,却找不到对我有用的解决办法.
Cloning github.com/ThiagoC0STA/kfk (Branch: main, Commit: f69b855)
Cloning completed: 1.077s
Looking up build cache...
Build Cache not found
Running "vercel build"
Vercel CLI 28.2.2
Installing dependencies...
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-elastic-carousel@0.11.5
npm ERR! Found: react@18.2.0
npm ERR! node_modules/react
npm ERR! react@"18.2.0" from the root project
npm ERR! peer react@"^17.0.2 || ^18.0.0-0" from next@12.2.5
npm ERR! node_modules/next
npm ERR! next@"12.2.5" from the root project
npm ERR! 5 more (react-dom, react-slick, styled-components, styled-jsx, use-sync-external-store)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"15 - 17" from react-elastic-carousel@0.11.5
npm ERR! node_modules/react-elastic-carousel
npm ERR! react-elastic-carousel@"^0.11.5" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react@17.0.2
npm ERR! node_modules/react
npm ERR! peer react@"15 - 17" from react-elastic-carousel@0.11.5
npm ERR! node_modules/react-elastic-carousel
npm ERR! react-elastic-carousel@"^0.11.5" 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! See /vercel/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /vercel/.npm/_logs/2022-09-12T18_11_25_601Z-debug-0.log
Error: Command "npm install" exited with 1package.json
{
"name": "kfk",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"next": "12.2.5",
"next-images": "^1.8.4",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-elastic-carousel": "^0.11.5",
"react-slick": "^0.29.0",
"slick-carousel": "^1.8.1",
"styled-components": "^5.3.5"
},
"devDependencies": {
"babel-plugin-styled-components": "^2.0.7",
"eslint": "8.22.0",
"eslint-config-next": "12.2.5"
}
}我不明白为什么我会突然出现这个错误,因为我已经部署了几个星期了,而且这个错误是从不知道的地方开始的。
发布于 2022-09-12 18:53:57
试着跑
npm install --legacy-peer-deps
发布于 2022-09-12 23:00:01
https://stackoverflow.com/questions/73693694
复制相似问题