You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用pnpm构建NextJS+TS项目时@microsoft/signalr包报错

NextJS + TypeScript + @microsoft/signalr 构建项目时pnpm build报错求助

我正在使用NextJS 13.4.0、TypeScript 5.1.6和@microsoft/signalr 7.0.7开发项目,执行pnpm build命令构建项目时出现报错,报错截图如下:

报错截图

以下是我的package.json文件内容:

{
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next build && next start",
    "lint": "next lint"
  },
  "dependencies": {
    "@ant-design/icons": "^5.1.4",
    "@emotion/react": "^11.11.1",
    "@emotion/styled": "^11.11.0",
    "@microsoft/signalr": "^7.0.7",
    "@reduxjs/toolkit": "^1.9.5",
    "antd": "^5.6.4",
    "axios": "^1.4.0",
    "eslint": "8.39.0",
    "eslint-config-next": "13.4.0",
    "framer-motion": "^10.12.18",
    "immer": "^10.0.2",
    "js-convert-case": "^4.2.0",
    "js-cookie": "^3.0.5",
    "lodash": "^4.17.21",
    "next": "13.4.0",
    "next-i18next": "^13.3.0",
    "next-redux-wrapper": "^8.1.0",
    "polylabel": "^1.1.0",
    "qs": "^6.11.2",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-draggable": "^4.4.5",
    "react-redux": "^8.1.1",
    "react-toastify": "^9.1.3",
    "redux-thunk": "^2.4.2",
    "three": "^0.153.0",
    "uuid": "^9.0.0"
  },
  "devDependencies": {
    "@types/js-cookie": "^3.0.3",
    "@types/lodash": "^4.14.195",
    "@types/node": "^20.3.3",
    "@types/polylabel": "^1.1.0",
    "@types/qs": "^6.9.7",
    "@types/react": "^18.2.14",
    "@types/react-dom": "^18.2.6",
    "@types/three": "^0.152.1",
    "@types/uuid": "^9.0.2",
    "sass": "^1.63.6",
    "typescript": "^5.1.6"
  }
}

有没有人知道该如何解决这个问题?非常感谢!

内容的提问来源于stack exchange,提问作者RomCoca

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.17 06:20:28