我有一个使用早午餐构建的React项目。我现在仅通过尝试第一个示例来尝试使用if context == &SessionRunningContext {
// Do something
}
:
material-ui-pickers
然后包装整个应用程序:
// Imports
/* eslint-disable */
import MuiPickersUtilsProvider from 'material-ui-pickers/utils/MuiPickersUtilsProvider';
// pick utils
import MomentUtils from 'material-ui-pickers/utils/moment-utils';
控制台中出现以下错误:
<MuiPickersUtilsProvider utils={MomentUtils}>
<App />
</MuiPickersUtilsProvider>
我的Uncaught Error: Cannot find module 'babel-runtime/core-js/object/get-prototype-of' from 'material-ui-pickers/utils/MuiPickersUtilsProvider.js'
:
package.json
我没有找到太多信息,唯一的事情是关于安装{
"name": "brunch-app",
"description": "Brunch.io application",
"private": true,
"author": "",
"version": "0.0.1",
"repository": "",
"scripts": {
"start": "brunch watch --server",
"build": "brunch build --production"
},
"dependencies": {
"@material-ui/core": "^1.4.0",
"babel-runtime": "^6.26.0",
"material-ui-pickers": "^1.0.0-rc.11",
"moment": "^2.22.2",
"prop-types": "^15.6.0",
"react": "^16.2",
"react-dom": "^16.2",
"react-redux": "~5.0.6",
"react-router-dom": "^4.3.1",
"redux": "~3.7.2",
"shortid": "^2.2.11"
},
"devDependencies": {
"auto-reload-brunch": "^2",
"babel-brunch": "~6.1.1",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "~6.24",
"brunch": "^2",
"clean-css-brunch": "^2",
"enzyme": "^3.3.0",
"eslint": "^4.16.0",
"eslint-config-airbnb": "^16.1.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-react": "^7.6.1",
"hmr-brunch": "^0.1",
"uglify-js-brunch": "^2"
}
}
的信息,我确实做到了,但是没用。
谢谢。