Error: Object(...) is not a function - Notistack

614 Views Asked by At

Node version : 8.10.0

Since I have updated my code on my WebApp, there is an error with notistack. I found then it could be helpful to upgrade material-ui version, but I cannot actualy. Until I re-build my app, it was working well.

Package.json :

{
"name": "fuse-react-app",
"version": "2.2.4",
"private": true,
"dependencies": {
    "@antv/data-set": "^0.10.2",
    "@antv/g2": "3.2.2",
    "@ckeditor/ckeditor5-build-classic": "^12.2.0",
    "@ckeditor/ckeditor5-react": "^1.1.3",
    "@date-io/date-fns": "1.1.0",
    "@material-ui/core": "^3.9.3",
    "@material-ui/icons": "3.0.2",
    "@material-ui/pickers": "^3.2.2",
    "@material-ui/styles": "^4.3.0",
    "@react-pdf/renderer": "^1.6.10",
    "@stripe/stripe-js": "^1.9.0",
    "@tinymce/tinymce-react": "^3.2.0",
    "auth0-lock": "^11.27.0",
    "autosuggest-highlight": "3.1.1",
    "axios": "^0.19.0",
    "axios-mock-adapter": "1.16.0",
    "babel-polyfill": "7.0.0-beta.3",
    "base64-img": "^1.0.4",
    "bizcharts": "^3.5.5",
    "bootstrap": "^4.3.1",
    "chart.js": "2.7.3",
    "ckeditor5": "^12.2.0",
    "classnames": "latest",
    "date-fns": "2.0.0-alpha.27",
    "downshift": "3.2.6",
    "eslint-config-airbnb": "^17.1.1",
    "eslint-config-prettier": "^6.0.0",
    "eslint-plugin-prettier": "^3.1.0",
    "firebase": "5.8.5",
    "formsy-react": "1.1.5",
    "google-map-react": "1.1.2",""
    "install": "^0.13.0",
    "invariant": "^2.2.2",
    "js-file-download": "^0.4.8",
    "js-yaml": "^3.13.1",
    "jsonwebtoken": "8.5.0",
    "jss-extend": "6.2.0",
    "jwt-decode": "2.2.0",
    "keycode": "2.2.0",
    "lodash": "^4.17.20",
    "logrocket": "^1.0.3",
    "material-ui-pickers": "2.2.4",
    "material-ui-popup-state": "1.2.0",
    "mobile-detect": "1.4.3",
    "moment": "^2.24.0",
    "mui-datatables": "^2.14.0",
    "notistack": "^0.9.5",
    "path-to-regexp": "3.0.0",
    "perfect-scrollbar": "1.4.0",
    "prettier": "^1.18.2",
    "prismjs": "1.15.0",
    "prop-types": "^15.7.2",
    "qs": "6.6.0",
    "query-string": "^6.11.1",
    "raw-loader": "1.0.0",
    "react": "16.8.4",
    "react-autosuggest": "9.4.3",
    "react-beautiful-dnd": "10.0.4",
    "react-big-calendar": "0.20.3",
    "react-bootstrap": "^1.0.0-beta.12",
    "react-chartjs-2": "2.7.4",
    "react-color": "^2.17.3",
    "react-dom": "16.8.4",
    "react-draggable": "3.2.1",
    "react-frame-component": "4.1.0",
    "react-jss": "8.6.1",
    "react-loadable": "5.5.0",
    "react-masonry-css": "1.0.12",
    "react-number-format": "4.0.6",
    "react-popper": "1.0.2",
    "react-redux": "6.0.1",
    "react-router-config": "4.4.0-beta.6",
    "react-router-dom": "4.4.0-beta.6",
    "react-scripts": "2.1.5",
    "react-select": "^2.4.3",
    "react-stripe-elements": "^3.0.0",
    "react-swipeable-views": "0.13.1",
    "react-table": "6.9.2",
    "react-text-mask": "5.4.3",
    "react-virtualized": "9.21.0",
    "redux": "4.0.1",
    "redux-thunk": "2.3.0",
    "sweetalert": "^2.1.2",
    "tailwindcss": "0.7.4",
    "typeface-muli": "0.0.71",
    "uuid": "^3.3.3",
    "velocity-animate": "^1.5.2",
    "velocity-react": "^1.4.1",
    "warning": "^3.0.0",
    "yarn": "^1.19.1"
},
"resolutions": {
    "react": "16.8.4",
    "react-dom": "16.8.4"
},
"devDependencies": {
    "@babel/core": "7.2.2",
    "@babel/node": "7.2.2",
    "@babel/preset-env": "7.3.1",
    "cross-env": "5.2.0",
    "globby": "8.0.2",
    "js-beautify": "1.9.0",
    "marked": "^0.7.0",
    "purgecss": "1.1.0",
    "webpack-bundle-analyzer": "^3.3.2"
}, ... }

I build my app, I execute npm start and then have the next error on my webapp :

Uncaught TypeError: Object(...) is not a function
at Object.<anonymous> (notistack.esm.js:414)

Does anyone have an idea of what could cause this error or how could I resolve it ? Regards,

0

There are 0 best solutions below