首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Next.js TypeError:无法设置未定义的属性(设置‘钩子’)

Next.js TypeError:无法设置未定义的属性(设置‘钩子’)
EN

Stack Overflow用户
提问于 2022-07-26 21:33:48
回答 1查看 1.1K关注 0票数 1

这个错误在启动应用程序或只是更新redux状态时只会“爆炸”,有时它不会显示很少的状态更新,但由于某种原因,它会在整个应用程序中出现。

我试过的是:

在过去的几天里,package-lock.json

  • dig
  • 删除了节点模块并启动了几个小时,但不幸的是,对于我的情况,没有任何东西出现.

TypeError的一个截图:

这是我的package.json

代码语言:javascript
复制
  {
  "name": "something-admin",
  "private": true,
  "scripts": {
    "dev": "next dev -p 3000",
    "start": "next start",
    "lint": "next lint",
    "build:export": "next build && next export -o build/"
  },
  "dependencies": {
    "@date-io/date-fns": "^1.3.13",
    "@material-ui/core": "^4.11.2",
    "@material-ui/icons": "^4.11.2",
    "@material-ui/pickers": "^3.3.10",
    "@reduxjs/toolkit": "1.8.3",
    "@zeit/next-sass": "^1.0.1",
    "antd": "^4.5.2",
    "axios": "^0.21.4",
    "bootstrap": "^4.5.3",
    "chart.js": "^2.9.4",
    "classnames": "^2.2.6",
    "cookie": "^0.4.1",
    "customize-cra": "^1.0.0",
    "date-fns": "^2.28.0",
    "draft-js": "^0.11.7",
    "draftjs-to-html": "^0.9.1",
    "es6-promise": "^4.2.8",
    "firebase": "^8.2.1",
    "history": "^4.10.1",
    "i18next": "^19.8.4",
    "immutability-helper": "^3.1.1",
    "js-cookie": "^2.2.1",
    "jsonwebtoken": "^8.5.1",
    "lodash": "^4.17.20",
    "lodash.range": "^3.2.0",
    "mdi-react": "^7.4.0",
    "moment": "^2.29.1",
    "next": "^11.1.0",
    "next-compose-plugins": "^2.2.0",
    "next-images": "^1.3.0",
    "next-optimized-images": "^2.6.2",
    "next-redux-saga": "^4.1.2",
    "next-redux-wrapper": "^6.0.2",
    "next-routes": "^1.4.2",
    "node-sass": "^4.14.1",
    "polished": "^4.0.5",
    "postcss": "^8.3.6",
    "prop-types": "^15.7.2",
    "rc-notification": "^4.5.4",
    "rc-slider": "^8.7.1",
    "rc-time-picker": "^3.7.3",
    "rc-tooltip": "^5.0.1",
    "react": "^17.0.2",
    "react-beautiful-dnd": "^13.0.0",
    "react-big-calendar": "^0.38.0",
    "react-chartjs-2": "^2.11.1",
    "react-color": "^2.19.3",
    "react-cookie": "^4.0.3",
    "react-csv": "^2.0.3",
    "react-custom-scrollbars": "^4.2.1",
    "react-datepicker": "^4.3.0",
    "react-device-detect": "^1.15.0",
    "react-dom": "^17.0.2",
    "react-dotdotdot": "^1.3.1",
    "react-draft-wysiwyg": "^1.14.7",
    "react-dropzone": "^11.2.4",
    "react-facebook-login": "^4.1.1",
    "react-google-login": "^5.2.2",
    "react-highlight-words": "^0.16.0",
    "react-hook-form": "^7.9.0",
    "react-i18next": "^11.8.4",
    "react-image-lightbox": "^5.1.1",
    "react-images": "^1.1.0-beta.3",
    "react-intl": "^5.20.4",
    "react-lazyload": "^2.6.5",
    "react-redux": "^7.2.6",
    "react-router": "^5.2.0",
    "react-router-dom": "^5.2.0",
    "react-scripts": "^4.0.1",
    "react-scroll": "^1.8.1",
    "react-select": "^3.1.1",
    "react-slick": "^0.27.12",
    "react-smooth-scrollbar": "^8.0.6",
    "react-syntax-highlighter": "^15.4.3",
    "react-table": "^7.6.3",
    "react-text-mask": "^5.4.3",
    "react-toastify": "^8.1.0",
    "react-vis": "^1.11.7",
    "reactstrap": "^8.7.1",
    "recharts": "^1.8.5",
    "recompose": "^0.30.0",
    "redux": "^4.0.4",
    "redux-actions": "^2.6.5",
    "redux-devtools-extension": "^2.13.8",
    "redux-form": "^8.3.7",
    "redux-persist": "^6.0.0",
    "slick-carousel": "^1.8.1",
    "smooth-scrollbar": "^8.5.3",
    "text-mask-addons": "^3.8.0"
  },
  "devDependencies": {
    "@svgr/webpack": "^5.5.0",
    "eslint": "7",
    "eslint-config-next": "12.0.2"
  }
}
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-08-16 15:18:09

更新

问题来自"rc-notification“,因为某种原因,lib将其抛到各处,移除库,修复了问题。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73129969

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档