next.js Yarn安装无法形成锐利且失败

vm0i2vca  于 11个月前  发布在  Yarn
关注(0)|答案(1)|浏览(156)

我已经更新了Node和Yarn,但是当我试图在NextJS项目上运行yarn install时,它会抛出以下命令:

...
➤ YN0007: │ sharp@npm:0.29.3 must be built because it never has been before or the last one failed
➤ YN0009: │ sharp@npm:0.29.3 couldn't be built successfully (exit code 1, logs can be found here: D:\TEMP\xfs-6da33975\build.log)
➤ YN0000: └ Completed in 0s 965ms
➤ YN0000: Failed with errors in 1s 538ms

字符串
我有yarn v3.5.0和Node v20.9.0
这里有一个我的Package.json的副本,以了解更多细节

{
  "name": "project",
  "version": "0.1.0",
  "private": true,
  ...
  "dependencies": {
    "@emotion/react": "^11.4.1",
    "@emotion/server": "^11.4.0",
    "@emotion/styled": "^11.3.0",
    "@fontsource/roboto": "^4.5.1",
    "@mui/icons-material": "^5.0.1",
    "@mui/material": "^5.0.2",
    "@mui/styles": "^5.8.4",
    "@stripe/react-stripe-js": "^1.8.1",
    "@stripe/stripe-js": "^1.32.0",
    "@types/echarts": "^4.9.12",
    "@types/lodash.clonedeep": "^4.5.7",
    "@types/react-color": "^3.0.6",
    "echarts": "^5.2.2",
    "echarts-gl": "^2.0.8",
    "env-cmd": "^10.1.0",
    "framer-motion": "^10.15.1",
    "i18next": "^21.2.4",
    "i18next-browser-languagedetector": "^6.1.2",
    "lodash.clonedeep": "^4.5.0",
    "next": "12.1.7-canary.4",
    "next-i18next": "^11.0.0",
    "next-seo": "^4.28.1",
    "next-sitemap": "^3.0.5",
    "react": "^18.2.0",
    "react-calendly": "^4.1.1",
    "react-color": "^2.19.3",
    "react-dom": "^18.2.0",
    "react-i18next": "^11.12.0",
    "react-multi-carousel": "^2.8.0",
    "react-rnd": "^10.3.7",
    "react-use": "^17.4.0",
    "sharp": "^0.29.3"
  },
  "devDependencies": {
    "@types/node": "^17.0.43",
    "@types/react": "17.0.25",
    "babel-runtime": "^6.26.0",
    "eslint": "7.32.0",
    "eslint-config-next": "11.1.2",
    "file-loader": "^6.2.0",
    "typescript": "4.6.2"
  }
}


当我将Node和Yarn升级到最新版本时,

tv6aics1

tv6aics11#

我有同样的问题更新您的Yarn版本到V4.0.1或降级您的节点版本到v16.16.0

相关问题