Material-UI AppBar导致无效的标签错误

时间:2017-02-26 14:15:17

标签: reactjs material-ui

我试图将AppBar插入到我的组件中。虽然所有其他材料-ui组件都能正常工作,但这会导致以下错误:

Uncaught Error: Invalid tag: /f7f7800bcef3562e6f4df1583b20797b.js
at invariant (bundle.js:724)
at validateDangerousTag (bundle.js:47303)
at new ReactDOMComponent (bundle.js:47330)
at Object.createInternalComponent (bundle.js:20522)
at instantiateReactComponent (bundle.js:21633)
at instantiateChild (bundle.js:46812)
at bundle.js:46839
at traverseAllChildrenImpl (bundle.js:21875)
at traverseAllChildrenImpl (bundle.js:21891)
at traverseAllChildrenImpl (bundle.js:21891)

这是AppBar的一段代码:

import React, { Component } from 'react';
import { List, ListItem } from 'material-ui/List';
import AppBar from 'material-ui/AppBar';

    class Contacts extends Component {
    render() {
        return (
            <div>
                <AppBar title="title"/>
                <List>
                    <ListItem primaryText="text" secondaryText="text"/>
                </List>
            </div>
        );
    }
}

export default Contacts;

当我删除<AppBar ... />时,一切正常。

这些是我的依赖:

"dependencies": {
 "axios": "^0.15.3",
"events": "^1.1.1",
"font-awesome": "^4.7.0",
"material-design-icons": "^3.0.1",
"material-ui": "^0.17.0",
"react": "^15.4.0",
"react-dom": "^15.4.0",
"react-router": "^3.0.2",
"react-tap-event-plugin": "^2.0.1",
"roboto-fontface": "^0.7.0",
"rxjs": "^5.1.1"
},
"devDependencies": {
"babel-core": "^6.23.1",
"babel-loader": "^6.3.2",
"babel-preset-es2015": "^6.22.0",
"babel-preset-react": "^6.23.0",
"css-loader": "^0.26.1",
"extract-text-webpack-plugin": "^2.0.0-rc.3",
"file-loader": "^0.10.0",
"html-webpack-plugin": "^2.28.0",
"webpack": "^2.2.1",
"webpack-dev-server": "^2.3.0"
}

当我尝试使用预先构建的SVG图标集中的组件时,会发生同样的错误。

0 个答案:

没有答案