此问题TypeError:回调不是函数

时间:2020-03-02 07:06:23

标签: node.js reactjs

此文件中有错误

node_modules / node_modules / scheduler / cjs / scheduler.development.js:99

我的项目正在加载,然后显示此错误:

TypeError:回调不是函数

   96 | var continuationCallback;
   97 | 
   98 | try {
>  99 |   continuationCallback = callback();
      | ^  100 | } finally {
  101 |   currentPriorityLevel = previousPriorityLevel;
  102 |   currentExpirationTime = previousExpirationTime;

这是我的 package.json

{
    "name": "chwgpanel",
    "version": "0.1.0",
    "private": true,
    "dependencies": {
        "@hot-loader/react-dom": "^16.12.0",
        "@types/gsap": "^1.20.0",
        "@types/jest": "23.3.10",
        "@types/node": "10.12.14",
        "@types/react": "16.7.17",
        "@types/react-dom": "16.0.11",
        "@types/react-router": "^4.4.3",
        "@types/react-router-dom": "^4.3.1",
        "axios": "^0.18.0",
        "gsap": "^2.0.2",
        "i18next": "^19.0.2",
        "image-thumbnail": "^1.0.7",
        "mobx": "5.7.0",
        "mobx-react": "5.4.2",
        "mobx-state-tree": "3.10.1",
        "moment-jalaali": "^0.8.3",
        "node-sass": "4.11.0",
        "npm": "^6.9.0",
        "react": "^16.6.3",
        "react-dom": "^16.6.3",
        "react-icons": "^3.9.0",
        "react-multistep": "^3.6.16",
        "react-router-dom": "4.3.1",
        "react-scripts": "2.1.1",
        "react-select": "^2.2.0",
        "react-toastify": "^4.5.2",
        "sass-loader": "^8.0.0",
        "typescript": "^3.6.5",
        "validate.js": "^0.12.0"
    },
    "scripts": {
        "start": "react-scripts start",
        "build": "react-scripts build",
        "test": "react-scripts test",
        "eject": "react-scripts eject"
    },
    "eslintConfig": {
        "extends": "react-app"
    },
    "browserslist": [
        ">0.2%",
        "not dead",
        "not ie <= 11",
        "not op_mini all"
    ]
}

希望你能帮助我
谢谢

1 个答案:

答案 0 :(得分:0)

您的scheduler模块的版本似乎有问题。尝试使用卸载您的scheduler模块,

npm uninstall scheduler --save 

然后尝试安装0.14.0版本,看看是否可行。

npm install scheduler@0.14.0 --save

希望这会有所帮助!