Tag: react bootstrap

找不到模块:'cldr'在… \ globalize \ dist \ globalize中

在我的React应用程序中,我试图使用react-widgets包中包含的DateTimePicker组件。 我也通过reactstrap使用Bootstrap 4组件。 我已经安装了这些模块: npm install –save bootstrap@4.0.0-beta reactstrap@next npm install –save globalize react-widgets-globalize 但是当我尝试使用DateTimePicker组件时: import Globalize from 'globalize' import globalizeLocalizer from 'react-widgets-globalize' import { DateTimePicker } from 'react-widgets' class Foo extends Component { render() { Globalize.locale('en') globalizeLocalizer() let formatter = Globalize.dateFormatter({ raw: 'MMM dd, yyyy' }) return( <div> <DateTimePicker format={formatter} defaultValue={new Date()} time={false} /> […]

react-bootstrap不包含css

我的jsx文件成功识别react-bootstrap元素,但是没有样式给他们。 我的项目的node-modules文件夹包含react-bootstrap和bootstrap。 为什么会这样呢? var React = require('react'); var Button = require('react-bootstrap').Button; var Jumbotron = require('react-bootstrap').Jumbotron; var ReactComponentHi = React.createClass({displayName: 'Hi', render: function() { return ( <div> <Button bsStyle='success'> clickk </Button> <Jumbotron> <h1>Hello, world!</h1> <p>This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.</p> <p><Button bsStyle='primary'>Learn more</Button></p> […]

在create-react-app引导程序 – 在我的脚本之后反应加载,所以我的脚本具有低优先级

在create-react-app引导程序 – 在我的脚本之后反应加载,所以我的脚本具有低优先级。 我怎样才能改变它? 我不知道,因为无法更改react-create-app的webpackconfiguration。 在我的主要组件中,我补充道: import 'bootstrap/dist/css/bootstrap.css'; import 'bootstrap/dist/css/bootstrap-theme.css'; 然后在我的不同组件中添加这样的反应组件: import { Col, Navbar, Nav, NavItem } from 'react-bootstrap'

Webpack无法加载我的npm模块

我有麻烦了,我只是做了npm卸载react-bootstrap,然后npm安装react-bootstrap和webpack无法加载这个模块了。 我像这样启动webpack: /var/www/cloud/node_modules/.bin/webpack –config webpack.config.js –watch –display-error-details 这里是错误,它只是无法find在react-bootstrap内的package.json: ERROR in ./core/static/core/js/modules/dashboard/admin/Customer.js Module not found: Error: Cannot resolve module 'react-bootstrap' in /var/www/cloud/core/static/core/js/modules/dashboard/admin resolve module react-bootstrap in /var/www/cloud/core/static/core/js/modules/dashboard/admin looking for modules in /var/www/cloud/node_modules resolve 'file' react-bootstrap in /var/www/cloud/node_modules resolve file /var/www/cloud/node_modules/react-bootstrap is not a file /var/www/cloud/node_modules/react-bootstrap.js doesn't exist /var/www/cloud/node_modules/react-bootstrap.jsx doesn't exist resolve 'file' or 'directory' /var/www/cloud/node_modules/react-bootstrap resolve […]