babel: How can i resolve this error in @babel/runtime/core-js/map + material-ui/styles/withStyles.js?
I’m getting the following error while tried to webpack the application in windows 10 x64 b.
ERROR in ./node_modules/material-ui/styles/withStyles.js
Module not found: Error: Can't resolve '@babel/runtime/core-js/map'
I searched on the github and stackoverflow but don’t find proper answer.
my Material UI is "^1.0.0-beta.47",. and @babel/runtime": "^7.1.5".
I try that solutions
. 1-npm install @babel/runtime
2-npm install @material-ui/core
but I also have the error. How can i resolve this?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (5 by maintainers)
The
material-uibeta package is deprecated and buggy, hence the issue here. You should change to a stable version of@material-ui/core.@loganfsmyth Yeah! I switched to @material-ui/core entirely. It solves the problem.
@mikepc If you are using yarn you can use
resolutionsto install an old enough beta ofmaterial-ui’s@babel/runtimedependency which still includescore-js(e.g.@babel/runtime@7.0.0-beta.42). Another option is to install that version of@babel/runtimeas one of your dependencies, but it will only work if you are not using it. The safest way of fixing this issue is to create a fork ofmaterial-ui@1.0.0-beta.47and remove^from https://github.com/mui-org/material-ui/blob/d16e4f5115a9fde3e8958d7959a912a55cbb246d/packages/material-ui/package.json#L38.how bro ?