I'm getting this error while running npm start
in my react application.
Failed to compile.
./node_modules/@material-ui/core/ButtonBase/TouchRipple.js
Module not found: Can't resolve '@babel/runtime/helpers/builtin/assertThisInitialized' in '/Users/avishek/workspace/react/scout-app/node_modules/@material-ui/core/ButtonBase'
npm install
command is working properly, but when I'm trying to start the application it's giving the above mentioned error. I've tried with other options like: removing node_modules folder and package-lock.json file, but that doesn't help at all.
Here is my package.json file
{
"name": "scout-app-mui",
"version": "0.1.0",
"private": true,
"dependencies": {
"@material-ui/core": "1.4.2",
"@material-ui/icons": "1.1.0",
"autosuggest-highlight": "^3.1.1",
"axios": "^0.16.2",
"classnames": "^2.2.5",
"firebase": "^4.13.1",
"history": "^4.7.2",
"html-react-parser": "^0.4.1",
"jss": "^9.4.0",
"jss-preset-default": "^4.0.1",
"prop-types": "^15.6.0",
"react": "^16.3.2",
"react-autosuggest": "^9.3.2",
"react-avatar-editor": "^11.0.2",
"react-dom": "^16.3.2",
"react-facebook-login": "^4.0.1",
"react-google-login": "^3.1.0",
"react-jss": "^8.2.0",
"react-loadable": "^4.0.5",
"react-media": "^1.6.1",
"react-redux": "^5.0.6",
"react-router-dom": "^4.2.2",
"react-select": "^1.2.1",
"react-share": "^2.1.1",
"recharts": "^1.0.0-beta.10",
"recompose": "^0.26.0",
"redux": "^3.7.2",
"redux-devtools-extension": "^2.13.2",
"redux-form": "^7.3.0",
"redux-thunk": "^2.2.0"
},
"devDependencies": {
"babel-eslint": "^8.0.2",
"body-parser": "^1.18.2",
"eslint": "^4.12.0",
"eslint-config-airbnb": "^16.1.0",
"eslint-friendly-formatter": "^3.0.0",
"eslint-loader": "^1.9.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-react": "^7.5.1",
"express": "^4.16.2",
"react-scripts": "^1.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
}
Install please 1.4.3 and don't pin it. Use caret.
https://github.com/mui-org/material-ui/releases/tag/v1.4.3
Thanks that resolved my issue!
You may close this issue
Please do not close this issue. This is a real issue and it stems from the update of the dependency "recompose". Please see: https://github.com/acdlite/recompose/issues/723
@goyney Oops, sorry. Will release recompose soon.
Done https://github.com/acdlite/recompose/releases/tag/v0.28.2
Remove and add back material-ui to update transitive dependency.
@TrySound :ok_hand:
This has flamed back up in my project. I have spent a few hours trying out all kinds of combinations of different versions of @babel/runtime
and recompose
, including fixing them via yarn resolutions in package.json. And clearing out node_modules and yarn cache. Nothing seems to work any more :-(
Thanx there!
I'm trying to learn react, I'm ten minutes in and this nonsense starts. I'm going back to vanilla javascript.
@samphire This type of problem is the downside of modern bundling. Nonetheless I'd never go back to vanilla JS as overall it is much more productive. Sorry you ran into it so soon
Most helpful comment
I'm trying to learn react, I'm ten minutes in and this nonsense starts. I'm going back to vanilla javascript.