Material ui 从0.9升级到1后缺少材质ui getMuiTheme

Material ui 从0.9升级到1后缺少材质ui getMuiTheme,material-ui,Material Ui,未捕获错误:模块构建失败:错误:enoint:没有这样的文件或目录,打开“/Users/leongaban/projects/go/src/github.com/pizzahutdigital/mythor/node_modules/material ui/styles/getMuiTheme.js” 目前,我们正在使用的主题、样式和组件构建一个应用程序 但是,我需要网格组件,它不存在于0.9中,但存在于1.0 beta中。我找到“材质网格”:“^0.1.0”并安装了它 必须将此添加到inde

未捕获错误:模块构建失败:错误:enoint:没有这样的文件或目录,打开“/Users/leongaban/projects/go/src/github.com/pizzahutdigital/mythor/node_modules/material ui/styles/getMuiTheme.js”

目前,我们正在使用的主题、样式和组件构建一个应用程序

但是,我需要网格组件,它不存在于
0.9
中,但存在于
1.0 beta
中。我找到
“材质网格”:“^0.1.0”
并安装了它

必须将此添加到
index.js

导入'material grid/dist/css/material grid.css'

必须确保我的网页3规则在哪里更新

module: {
  rules: [
    {
      test: /\.js$/,
      loader: 'babel-loader',
      exclude: /node_modules/
    },
    {
      test: /\.s?css/,
      use: [
        'style-loader',
        'css-loader',
        'sass-loader'
      ]
    },
    {
      test: /\.(png|jpg|jpeg|gif|svg|woff|woff2|ttf|eot)/,
      loader: 'file-loader?name=[path][name].[ext]'
    }
  ]
}
现在网格将工作:

<div>
  <Grid>
    <Cell col={12}><div className="box">12</div></Cell>
  </Grid>
  <Grid>
    <Cell col={4} tablet={2} ><div className="box">4-2</div></Cell>
    <Cell col={8} tablet={6} ><div className="box">8-6</div></Cell>
  </Grid>
  <Grid>
    <Cell col={1} tablet={8} phone={4}><div className="box">1-8-4</div></Cell>
    <Cell col={1} tablet={8} phone={4}><div className="box">1-8-4</div></Cell>
    <Cell col={1} tablet={4} phone={4}><div className="box">1-8-4</div></Cell>
    <Cell col={1} tablet={4} phone={4}><div className="box">1-8-4</div></Cell>
    <Cell col={1}><div className="box">1</div></Cell>
    <Cell col={1}><div className="box">1</div></Cell>
    <Cell col={1}><div className="box">1</div></Cell>
    <Cell col={1}><div className="box">1</div></Cell>
    <Cell col={1}><div className="box">1</div></Cell>
    <Cell col={1}><div className="box">1</div></Cell>
    <Cell col={1}><div className="box">1</div></Cell>
    <Cell col={1}><div className="box">1</div></Cell>
  </Grid>
</div>

12
4-2
8-6
1-8-4
1-8-4
1-8-4
1-8-4
1.
1.
1.
1.
1.
1.
1.
1.
特德最新消息
以下内容引发错误:

import React from 'react';
import ReactDOM from 'react-dom';

import { MuiThemeProvider, createMuiTheme } from 'material-ui/styles';
import * as Colors from 'material-ui/styles/colors';
import { fade } from 'material-ui/utils/colorManipulator';

// Styles
import 'material-grid/dist/css/material-grid.css';
import './styles/main.scss';

// Containers
import App from './containers/App';

const theme = createMuiTheme({
  appBar: {
    color: Colors.cyan400,
    textColor: Colors.white
  },
  palette: {
    primary1Color: Colors.cyan500,
    primary2Color: Colors.blueGrey700,
    accent1Color: Colors.deepOrange500,
    accent2Color: Colors.blueGrey400,
    accent3Color: Colors.blueGrey500
  },
  cardMedia: {
    overlayContentBackground: fade(Colors.darkBlack, 0.87)
  }
});

ReactDOM.render(
  <MuiThemeProvider theme={theme}>
    <App />
  </MuiThemeProvider>,
  document.getElementById('app')
);
从“React”导入React;
从“react dom”导入react dom;
从“材质ui/样式”导入{MuiThemeProvider,createMuiTheme};
从“材质ui/样式/颜色”导入*作为颜色;
从“material ui/utils/colorManipulator”导入{fade};
//风格
导入“material grid/dist/css/material grid.css”;
导入“/styles/main.scss”;
//容器
从“./containers/App”导入应用程序;
const theme=createMuiTheme({
appBar:{
颜色:Colors.cyan400,
textColor:Colors.white
},
调色板:{
原色1:颜色。青色500,
primary2Color:Colors.blueGrey700,
Accent1颜色:颜色。深橙色500,
accent2Color:Colors.blueGrey400,
accent3Color:Colors.blueGrey500
},
cardMedia:{
OverlyContentBackground:淡入淡出(Colors.darkBlack,0.87)
}
});
ReactDOM.render(
,
document.getElementById('app')
);
index.js:35未捕获的TypeError:(0,_styles.CreateMuiteme)不是函数


中的
getmuiteme
已被
中的
createmuiteme
替换为
'material-ui/styles'

这对我很有用:
从“材质ui/样式”导入{MuiThemeProvider,createMuiTheme};

请参阅文档->


(主版
master
和v1 beta版
上的文档有所不同,请务必查看v1分支文档)

Hmm,当我切换到该版本时,我遇到了这个错误,我将用我添加的新代码更新我的问题:`index.js:35 uncaughttypeerror:'0,_styles.createMuiTheme)不是函数`Ah,createMuiTheme不存在。。。我升级了材料界面,只有getMuiTheme在那里